From 7f3e18e291a56da477093aa585ff3b4ba2a39d3c Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Sun, 19 Apr 2015 11:02:02 -0500 Subject: [PATCH] [skip] add support for versions with no minor tag --- build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c9e0007d..7d26ff44 100644 --- a/build.gradle +++ b/build.gradle @@ -39,8 +39,12 @@ if (!('release' in gradle.startParameter.taskNames)) { } } else { project.ext.set("hash", "") - project.ext.set("apktool_version", apktoolversion_major + "-" + apktoolversion_minor); - println "Building RELEASE (" + getCheckedOutBranch() + "): " + apktoolversion_major + "-" + apktoolversion_minor; + if (apktoolversion_minor.length() > 0) { + project.ext.set("apktool_version", apktoolversion_major + "-" + apktoolversion_minor); + } else { + project.ext.set("apktool_version", apktoolversion_major); + } + println "Building RELEASE (" + getCheckedOutBranch() + "): " + project.ext.apktool_version; } build.doFirst {