Document how to make a shadowed JAR the default output of a project#1937
Document how to make a shadowed JAR the default output of a project#1937
Conversation
…project builds (#1893) Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
|
@copilot Add integration tests for verifying these cases. |
#1893) Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Added two integration tests in commit 37538f0:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
In multi-project builds, consumers currently must explicitly select the
shadowconfiguration (project(path = ":foo", configuration = "shadow")), making it easy to accidentally depend on the unshadowed JAR. This PR documents how to reconfigureapiElements/runtimeElementsso the shadowed JAR becomes the default artifact.Changes
docs/multi-project/README.md: New section "Making the Shadowed JAR the Default Artifact"apiElementsandruntimeElementsto replace the default JAR with the shadowed JAR (Kotlin + Groovy DSL)implementation(project(":foo"))excluderules to drop bundled transitive depssrc/functionalTest/kotlin/.../JavaPluginsTest.kt: Two new integration testsshadowJarIsDefaultArtifactInMultiProjectBuild: verifies that reconfiguringapiElements/runtimeElementsexposes the shadow JAR (foo-1.0-all.jar) as the default artifact on the consumer's classpath instead of the regular JAR (foo-1.0.jar)excludeRulesPreventBundledDepsOnConsumerClasspath: verifies that addingexcluderules to the configurations prevents bundled transitive dependencies from appearing separately on the consumer's classpath🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.