From 97f52bfd820f3bea5ddf68313eeb7104933cfff5 Mon Sep 17 00:00:00 2001 From: Tal Moran Date: Wed, 9 Nov 2016 15:21:16 +0200 Subject: [PATCH] Fixed fatmain bug in build.gradle-template --- build.gradle-template | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build.gradle-template b/build.gradle-template index 638c953..f80c9f3 100644 --- a/build.gradle-template +++ b/build.gradle-template @@ -131,17 +131,19 @@ if (project.hasProperty('mainClassName') && (mainClassName != null)) { destinationDir = buildDir - def fatMain = hasProperty('fatmain') ? fatmain : mainClassName + def fatMain + + if (this.hasProperty('fatmain')) { + fatMain = fatmain + appendix = "fat-${fatMain}" + } else { + fatMain = mainClassName + appendix = "fat" + } applicationClass fatMain - def testJar = hasProperty('test') - - if (hasProperty('fatmain')) { - appendix = "fat-${fatMain}" - } else { - appendix = "fat" - } + def testJar = this.hasProperty('test') if (testJar) { from sourceSets.test.output