failing to affect class path

In a Gradle 6.1.1 composite build, I added to the 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:


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.

It’s quite old issue, but for those who also have this problem:
add to your

As stated in Build Environment " You can also set system properties in files with the prefix systemProp."

You can also pass it via command line using