summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/android/CordovaLib/cordova.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/android/CordovaLib/cordova.gradle')
-rw-r--r--[-rwxr-xr-x]StoneIsland/platforms/android/CordovaLib/cordova.gradle13
1 files changed, 11 insertions, 2 deletions
diff --git a/StoneIsland/platforms/android/CordovaLib/cordova.gradle b/StoneIsland/platforms/android/CordovaLib/cordova.gradle
index 6e89c4c2..21a01bb5 100755..100644
--- a/StoneIsland/platforms/android/CordovaLib/cordova.gradle
+++ b/StoneIsland/platforms/android/CordovaLib/cordova.gradle
@@ -61,7 +61,7 @@ String doFindLatestInstalledBuildTools(String minBuildToolsVersion) {
highestBuildToolsVersion
} else {
throw new RuntimeException(
- "No installed build tools found. Please install the Android build tools version " +
+ "No installed build tools found. Install the Android build tools version " +
minBuildToolsVersion + " or higher.")
}
}
@@ -125,7 +125,15 @@ def doExtractIntFromManifest(name) {
def pattern = Pattern.compile(name + "=\"(\\d+)\"")
def matcher = pattern.matcher(manifestFile.getText())
matcher.find()
- return Integer.parseInt(matcher.group(1))
+ return new BigInteger(matcher.group(1))
+}
+
+def doExtractStringFromManifest(name) {
+ def manifestFile = file(android.sourceSets.main.manifest.srcFile)
+ def pattern = Pattern.compile(name + "=\"(\\S+)\"")
+ def matcher = pattern.matcher(manifestFile.getText())
+ matcher.find()
+ return matcher.group(1)
}
def doPromptForPassword(msg) {
@@ -179,6 +187,7 @@ ext {
privateHelpers.getProjectTarget = { doGetProjectTarget() }
privateHelpers.findLatestInstalledBuildTools = { doFindLatestInstalledBuildTools('19.1.0') }
privateHelpers.extractIntFromManifest = { name -> doExtractIntFromManifest(name) }
+ privateHelpers.extractStringFromManifest = { name -> doExtractStringFromManifest(name) }
privateHelpers.promptForPassword = { msg -> doPromptForPassword(msg) }
privateHelpers.ensureValueExists = { filePath, props, key -> doEnsureValueExists(filePath, props, key) }