-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
gradle: Use dependency's jars for compilation #3642
Conversation
@rotty3000 Can you check if this fix removes the need for the following? |
We now use the newer strictly DSL. See https://docs.gradle.org/6.0.1/userguide/rich_versions.html Signed-off-by: BJ Hargrave <[email protected]>
If the `java-library` plugin is applied, Gradle will compile against the dependency's classes dir instead of building the jar and compiling against the jar. This is not good for bundles since Bnd can pull in code from other places and also set the package metadata. So we configure the sourceSet's compileClasspath configuration to use jars for compilation. This support requires Gradle 5.6 or later. See https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_classes_usage Signed-off-by: BJ Hargrave <[email protected]>
For reference, this is how Gradle processes the |
@bjhargrave sorry I didn't get a chance to look at this yet, but I will try sometime later this week with the junit5 project. Thanks for tackling this. |
@bjhargrave is this too heavy a change for inclusion into the discussed 4.3.2 maintenance release? |
It is fairly safe, but the commit may not merge easily due to lots of changes in the gradle plugin code for Bnd 5.0. |
got it! |
If the
java-library
plugin is applied, Gradle will compile againstthe dependency's classes dir instead of building the jar and compiling
against the jar. This is not good for bundles since Bnd can pull in code
from other places and also set the package metadata.
So we configure the sourceSet's compileClasspath configuration to use
jars for compilation.
This support requires Gradle 5.6 or later.
See https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_classes_usage