I’m currently planning to migrate all our projects from Gradle (STS) plugin to Buildship.
There is a special functionality in Gradle (STS) plugin what I’m still not sure how to realize it with Buildship. Therefore this post here.
I have a bunch of projects which are partly and irregularly depending on each other (w/o cycles).
I would like to arrange them in a composite build to get advantages from Buildship to substitute binary library dependencies (jars) by project dependencies if the particular project is checked out to Eclipse.
This is already working today by setting up a “parent” project referencing all potential projects inside its settings.gradle file similar to the following:
if (file(’…/project-client’).exists()) includeBuild ‘…/project-client’
if (file(’…/project-server’).exists()) includeBuild ‘…/project-server’
In that case Buildship substitutes a binary dependency if the particular project has been checked out and substitutes it back if the projects gets deleted from the Eclipse workspace.
As this works well, deleting a particular project from Eclipse is not the common case. Instead we close (means, by the Eclipse Close menu entry) a project to get it invisible for the Eclipse build system.
However, doing that will result in an Eclipse build error:
Is there a functionality to get the project substitution disabled by Buildship if the Eclipse project is closed?
I could imagine that Buildship should be able to do it automatically as it should have the projects states available.
P.S. This is slightly related to the issue https://github.com/eclipse/buildship/issues/511 too, I guess.