Gradle nature lost after disabling composite build

buildship
eclipse

(Andrea) #1

In my Eclipse scenario I have 2 multi-project:

projectA
build.gradle
settings.gradle

  • module1
    build.gradle
  • module2
    build.gradle

projectB
build.gradle
settings.gradle

  • module3
    build.gradle

projectB’s build depends on projectA build:

includeBuild ‘…/projectA’

Everything works perfectly, I noticed that every “org.eclipse.buildship.core.prefs” in projectA have a property changed:

connection.project.dir=…/projectB

or for subprojects

connection.project.dir=…/…/projectB

But if I remove the composite build configuration and refresh all gradle projects, then projectA and all its subprojects lost their gradle nature and everything broke up.

I’m using both eclipse Neon and Oxygen.


(Stefan Oehme) #2

That is expected. You imported it as part of a composite and now removed it from the composite, which makes it disappear from Gradle’s point of view. If you want to work with project A as a standalone build, you can use the Add Gradle Nature command.


(Andrea) #3

Thanks for the explanation.