New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Buildship to separate runtime classpath based on source set information #3209
Conversation
I'm working on the performance test failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release notes need an update, otherwise this looks good.
@@ -28,6 +28,10 @@ Gradle now suppoprts version range in parent elements of POM, which was introduc | |||
IMPORTANT: if this is a patch release, ensure that a prominent link is included in the foreword to all releases of the same minor stream. | |||
Add--> | |||
|
|||
### Eclipse plugin separates output folders | |||
|
|||
The `eclipse` plugin now defines separate output directories for each source folders. Also, each source folder and dependency defines an additional `gradle_source_sets` classpath attribute. The attribute specifies to which sourceSet the entry belonged. Future [Buildship](http://eclipse.org/buildship) versions will use this information to separate source sets when launching Java applications within Eclipse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭕️ folder
@@ -28,6 +28,10 @@ Gradle now suppoprts version range in parent elements of POM, which was introduc | |||
IMPORTANT: if this is a patch release, ensure that a prominent link is included in the foreword to all releases of the same minor stream. | |||
Add--> | |||
|
|||
### Eclipse plugin separates output folders | |||
|
|||
The `eclipse` plugin now defines separate output directories for each source folders. Also, each source folder and dependency defines an additional `gradle_source_sets` classpath attribute. The attribute specifies to which sourceSet the entry belonged. Future [Buildship](http://eclipse.org/buildship) versions will use this information to separate source sets when launching Java applications within Eclipse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ This section is outdated. It does not reflect the actual implementation. How about not going into this detail at all and just explaining what it does? I had a draft of that on my branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the text from your branch.
92e1eaa
to
da9213f
Compare
This reverts commit 0f7ac32.
Eclipse source folders each have a scope assigned to them. This is currently the name of the SourceSet, but might evolve later to be the name of the component instead. The exact value is an implementation detail. However, we also need to track all the scopes that *use* that source folder, so its output can be included when running applications and tests in Eclipse. The output folder is not explicitly modeled in the .classpath file, but instead implicitly belongs to the source folder.
When calculating the linked resources, there's no need to set all attributes for the source directories because only the name and the location is used by LinkedResourcesCreator.
The source folder calculation is an expensive operation, yet it was called multiple times inside SourceFolderCreator.createSourceFolders() method.
94cfc53
to
c052c18
Compare
This pull request contains all changes required for eclipse/buildship#354: