Skip to content

Commit

Permalink
Use convention mapping for classifier on old gradle (#502)
Browse files Browse the repository at this point in the history
Fixes #463
  • Loading branch information
grossws authored and johnrengelman committed Sep 7, 2019
1 parent 2d2bd66 commit d5c662a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ class ShadowJavaPlugin implements Plugin<Project> {
ShadowJar shadow = project.tasks.create(SHADOW_JAR_TASK_NAME, ShadowJar)
shadow.group = SHADOW_GROUP
shadow.description = 'Create a combined JAR of project and runtime dependencies'
shadow.conventionMapping.with {
map('classifier') {
'all'
}
}
if (GradleVersion.current() >= GradleVersion.version("5.1")) {
shadow.archiveClassifier.set("all")
} else {
shadow.conventionMapping.with {
map('classifier') {
'all'
}
}
}
shadow.manifest.inheritFrom project.tasks.jar.manifest
shadow.doFirst {
Expand Down

0 comments on commit d5c662a

Please sign in to comment.