From 5ebbc5c14c92e3497b46e41d3f5f124543f1aafe Mon Sep 17 00:00:00 2001 From: Felipe Lima Date: Thu, 6 Sep 2018 16:53:08 -0700 Subject: [PATCH 1/2] Fix #336 "No value has been specified for property mainClassName" issue" --- .../gradle/plugins/shadow/ShadowApplicationPlugin.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy index 8eee894a5..449ae2978 100644 --- a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy +++ b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy @@ -43,8 +43,8 @@ class ShadowApplicationPlugin implements Plugin { ApplicationPluginConvention pluginConvention = ( ApplicationPluginConvention) project.convention.plugins.application - jar.inputs.property('mainClassName', pluginConvention.mainClassName) jar.doFirst { + jar.inputs.property('mainClassName', pluginConvention.mainClassName) manifest.attributes 'Main-Class': pluginConvention.mainClassName } } From 10f50a62925090913af169b316366a77173953ed Mon Sep 17 00:00:00 2001 From: Felipe Lima Date: Thu, 6 Sep 2018 17:04:40 -0700 Subject: [PATCH 2/2] Try another approach --- .../gradle/plugins/shadow/ShadowApplicationPlugin.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy index 449ae2978..3af15c6f1 100644 --- a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy +++ b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy @@ -43,8 +43,8 @@ class ShadowApplicationPlugin implements Plugin { ApplicationPluginConvention pluginConvention = ( ApplicationPluginConvention) project.convention.plugins.application + jar.inputs.property('mainClassName', "${-> pluginConvention.mainClassName }") jar.doFirst { - jar.inputs.property('mainClassName', pluginConvention.mainClassName) manifest.attributes 'Main-Class': pluginConvention.mainClassName } }