summaryrefslogtreecommitdiff
path: root/StoneIsland/plugins/phonegap-plugin-push/push.gradle
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-30 18:21:01 -0500
committerJules Laplace <jules@okfoc.us>2015-11-30 18:21:01 -0500
commitded2f8928dd509acc8d4ae1e4131b622c7bb4d9c (patch)
treea576defc78fac3b9c2c0d8a7beb18e78d6466255 /StoneIsland/plugins/phonegap-plugin-push/push.gradle
parent60bd9bf61e4d1f3fb3925807ca754f89743cfade (diff)
phonegap-plugin-push
Diffstat (limited to 'StoneIsland/plugins/phonegap-plugin-push/push.gradle')
-rw-r--r--StoneIsland/plugins/phonegap-plugin-push/push.gradle21
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..d61b60f5
--- /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")
+ }
+} \ No newline at end of file