You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you see is the illustration of a key difference between the java and java-library plugin.
With the java plugin, the runtimeElements and apiElements outgoing configurations both only have the variant with the jar artifact. That means that either for compiling or running, anything that requests java-api or java-runtime can only consume the jar produced by the project.
However with the java-library plugin, there is another variant registered with apiElements, the classes one. That variant produces a org.gradle.usage=java-api-classes which is sourced from the main source set compileJava task and is compatible with the java-api usage request.
It effectively states that for compilation, we can use directly the produced class file without the need for a jar to be built.
That's why only api:compileJava is executed.
Is the question just informative or is that causing unexpected missing jar files in a project?
My expectation is when you have a submodule dependency:
When I build
./gradlew :impl
I will see as part of the output:However, that is not the case in this project. https://github.com/nebula-plugins/gradle-nebula-integration/tree/master/jar-not-build
You can run
./gradlew :impl:classes
To get:
The text was updated successfully, but these errors were encountered: