Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2834

Detect Gradle project dependencies to other Gradle projects located in workspace and ...

    Details

    • Type: New Feature New Feature
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0.RELEASE
    • Fix Version/s: 3.6.3.RELEASE
    • Component/s: GRADLE
    • Labels:
      None

      Description

      This a variant of issue STS-2405 for project dependencies between
      Gradle projects (rather than between maven and Gradle projects).

      Another variant is STS-2836

        Activity

        Hide
        Stephen Haberman added a comment -

        Really great to see this. I'll add an note about our historical IvyDE usage that is related to this, and then defer to you on whether you'd like to promote it to an issue:

        • When we would have, say, 20-30 projects checked out locally, but only, say, 5 of them open in Eclipse (because they're the only ones I'm focused/working on right now), IvyDE would hook up the Eclipse projects of whatever we had open.
        • Now let's say I open another one of our projects in Eclipse. Potentially all 5 of the already-open projects in Eclipse could be referencing this project as the jar artifact (from when it was closed) and now should reference the newly-opened project.
        • Similarly, if I close a project, all of my still-open projects may refer to a now-closed project, and need to switch back to using a jar form.

        In IvyDE, there were two ways of doing this: 1) you could turn on "any time I open/close a project, automatically refresh the deps of all open projects" or 2) they provided a "Resolve All" button that would run "Refresh Deps" for all open projects in Eclipse.

        AFAIU (sorry if I've missed this?) right now in Gradle STS, I'd have to go click "Refresh Deps" for each open project? This seems tedious and error prone. Perhaps Gradle STS could have something similar to IvyDE's either automatically- or manually-triggered "refresh deps across all projects"? (Gradle is likely sufficiently faster than Ivy/IvyDE that just doing it automatically all the time would likely be preferable/not noticeable.)

        If this already "just works" in 3.6.3, I apologize, I am still on 3.6.2 and so am making assumptions about how this works today.

        Show
        Stephen Haberman added a comment - Really great to see this. I'll add an note about our historical IvyDE usage that is related to this, and then defer to you on whether you'd like to promote it to an issue: When we would have, say, 20-30 projects checked out locally, but only, say, 5 of them open in Eclipse (because they're the only ones I'm focused/working on right now), IvyDE would hook up the Eclipse projects of whatever we had open. Now let's say I open another one of our projects in Eclipse. Potentially all 5 of the already-open projects in Eclipse could be referencing this project as the jar artifact (from when it was closed) and now should reference the newly-opened project. Similarly, if I close a project, all of my still-open projects may refer to a now-closed project, and need to switch back to using a jar form. In IvyDE, there were two ways of doing this: 1) you could turn on "any time I open/close a project, automatically refresh the deps of all open projects" or 2) they provided a "Resolve All" button that would run "Refresh Deps" for all open projects in Eclipse. AFAIU (sorry if I've missed this?) right now in Gradle STS, I'd have to go click "Refresh Deps" for each open project? This seems tedious and error prone. Perhaps Gradle STS could have something similar to IvyDE's either automatically- or manually-triggered "refresh deps across all projects"? (Gradle is likely sufficiently faster than Ivy/IvyDE that just doing it automatically all the time would likely be preferable/not noticeable.) If this already "just works" in 3.6.3, I apologize, I am still on 3.6.2 and so am making assumptions about how this works today.
        Hide
        Kris De Volder (c) added a comment -

        Actually we are working on the 'open close' thing already. As well as making this work not just between disparate projects but also projects that are within the same multi-project heirarchy.

        There's no issue tracking this yet because a lot of the work is actually being Don 'of the books' so to speak by an external contributor (Jonathan Schneider from NetFlix).

        The open close listener is actually implemented already (with some rough edges and available in master, the support within multiproject builds is more difficult and will take more time.

        Show
        Kris De Volder (c) added a comment - Actually we are working on the 'open close' thing already. As well as making this work not just between disparate projects but also projects that are within the same multi-project heirarchy. There's no issue tracking this yet because a lot of the work is actually being Don 'of the books' so to speak by an external contributor (Jonathan Schneider from NetFlix). The open close listener is actually implemented already (with some rough edges and available in master, the support within multiproject builds is more difficult and will take more time.
        Hide
        Stephen Haberman added a comment -

        Great to hear! Thanks for the update.

        Show
        Stephen Haberman added a comment - Great to hear! Thanks for the update.
        Hide
        Vadim Lotarev added a comment -

        I've just installed 3.6.3 and do not see any changes regarding to this issue ... There are no any additional properties (like remap to maven project). Also all my workspace projects are not linked as was before. Should I do something special (re-create projects, open/close, etc) to have this feature worked?

        Show
        Vadim Lotarev added a comment - I've just installed 3.6.3 and do not see any changes regarding to this issue ... There are no any additional properties (like remap to maven project). Also all my workspace projects are not linked as was before. Should I do something special (re-create projects, open/close, etc) to have this feature worked?
        Hide
        Kris De Volder (c) added a comment -

        The feature has to be enabled in the Gradle preferences page. Access via "Window >> Preferences >> Gradle".

        If you are not seeing the "remap jars to Gradle projects" there then maybe double check that version of the Gradle plugins is indeed 3.6.3.
        Maybe something went wrong during the upgrade and you are still using an older version.

        One way to check version is via Eclipse's "Plugin Registry" view. search for plugins like "org.springsource.ide.eclipse.gradle.core" and check version.

        Show
        Kris De Volder (c) added a comment - The feature has to be enabled in the Gradle preferences page. Access via "Window >> Preferences >> Gradle". If you are not seeing the "remap jars to Gradle projects" there then maybe double check that version of the Gradle plugins is indeed 3.6.3. Maybe something went wrong during the upgrade and you are still using an older version. One way to check version is via Eclipse's "Plugin Registry" view. search for plugins like "org.springsource.ide.eclipse.gradle.core" and check version.

          People

          • Assignee:
            Kris De Volder (c)
            Reporter:
            Kris De Volder (c)
          • Votes:
            39 Vote for this issue
            Watchers:
            38 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: