how to use shadowJar's output as an artifact when ...
# community-support
y
how to use shadowJar's output as an artifact when using Composite Build. I have two gradle project A and B, B depends A, and use compisite build to reference A, but A use shadow plugin. when i use
includeBuild('../A') {
dependencySubstitution {
substitute module('me.myname:a') using project(':')
}
}
gradle will awayls use jar task's output
v
Besides that A hast most probably a build bug if you need to use manual dependency substitution, I guess you need to request the feature variant that the shadow plugin adds so basically bundling attribute changed to shadowed instead of external if you really want to depend on the shadowed variant.
y
so should i use org.gradle.api.artifacts.DependencySubstitutions#variant to select a shadow variant from shadow plugin? does shadow plugin provide those variant as a default?
ok i got it,just use shadow plugin and it will provide a shadowed variant automatically