diff options
| author | Jules Laplace <jules@okfoc.us> | 2017-02-16 01:24:12 +0100 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2017-02-16 01:24:12 +0100 |
| commit | 30c49550c89c1b69c680170d2dc247eac76bd463 (patch) | |
| tree | 8732652298b630b9ba15def97e59738f1c9bf7b6 /StoneIsland/platforms/android/CordovaLib/cordova.gradle | |
| parent | 8f1f626384e6ba75f4fb24c27e0973260a74421b (diff) | |
push plugin
Diffstat (limited to 'StoneIsland/platforms/android/CordovaLib/cordova.gradle')
| -rw-r--r--[-rwxr-xr-x] | StoneIsland/platforms/android/CordovaLib/cordova.gradle | 13 |
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) } |
