Hello,
I have altered the multi-project build sample according to https://docs.gradle.org/current/userguide/cross_project_publications.html that is I have added the lines of
- Example 1. Declaring an outgoing variant
- Example 2. Attaching an artifact to an outgoing configuration
To the “producer” project’s gradle.build
, which is supposed to produce an artifact that is used by the “consumer” project. (:list)
Also, the “producer” project includes the 'java-library' plugin
through the file /buildSrc/src/main/groovy/demo.java-library-conventions.gradle
Then I have added
- Example 4. An explicit configuration dependency
To the gradle.build
of the “consumer” project which is supposed to use this jar. (:app)
I understood Example 3 on the same page in that way, that I would have to encode the configuration
by much more detail but in this case I don’t actually have to “because”
the
Jar
task extendsAbstractArchiveTask
Consequently I did not put the code under Example 3
anywhere. Also because someTask
is only a token symbol for some arbitrary Task implementation.
Sadly trying to build this spawns the error message:
> Could not find method instrumentedClasspath() for arguments [DefaultProjectDependency{dependencyProject='project ':list'', configuration='instrumentedJars'}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Thank you,
von Spotz