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/plugins/phonegap-plugin-push/push.gradle | |
| parent | 8f1f626384e6ba75f4fb24c27e0973260a74421b (diff) | |
push plugin
Diffstat (limited to 'StoneIsland/plugins/phonegap-plugin-push/push.gradle')
| -rw-r--r-- | StoneIsland/plugins/phonegap-plugin-push/push.gradle | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/StoneIsland/plugins/phonegap-plugin-push/push.gradle b/StoneIsland/plugins/phonegap-plugin-push/push.gradle new file mode 100644 index 00000000..11e735ae --- /dev/null +++ b/StoneIsland/plugins/phonegap-plugin-push/push.gradle @@ -0,0 +1,21 @@ +import java.util.regex.Pattern + +def doExtractStringFromManifest(name) { + def manifestFile = file(android.sourceSets.main.manifest.srcFile) + def pattern = Pattern.compile(name + "=\"(.*?)\"") + def matcher = pattern.matcher(manifestFile.getText()) + matcher.find() + return matcher.group(1) +} + +android { + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + } + } + + defaultConfig { + applicationId = doExtractStringFromManifest("package") + } +} |
