In a Gradle 6.1.1 composite build, I added org.gradle.java.compile-classpath-packaging=true
to the gradle.properties
in the composite and in each included build.
From what I know, that property is supposed to make the classpath of tasks in projects to which JavaLibraryPlugin
has been applied include the jar file output, instead of the built classes directory output, of other projects.
This doesn’t seem to have worked for me, however, because the dependent included build in my case had the following path in its JavaCompile#classpath
:
~/Code/project1/common/build/classes/java/main
Am I mistaken about what that property should do? Is there some way that my configuration might be amiss?
To note: JavaLibraryPlugin
was not applied to my composite (as the composite doesn’t include any code itself; it’s just a way to combine other builds together), but it was applied to all the relevant included builds (by another included build that is itself a Gradle plugin that applies JavaLibraryPlugin
& performs some other configuration).
Once I’ve sorted out JavaCompile
, are there any other tasks that the property should affect? e.g., JavaExec
tasks?
Thanks for any help.