diff --git a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.groovy b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.groovy index 3551a1b3c..77a5aca4b 100644 --- a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.groovy +++ b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.groovy @@ -41,13 +41,14 @@ class ShadowJavaPlugin implements Plugin { 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 {