From ded2f8928dd509acc8d4ae1e4131b622c7bb4d9c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 30 Nov 2015 18:21:01 -0500 Subject: phonegap-plugin-push --- .../plugins/phonegap-plugin-push/push.gradle | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 StoneIsland/plugins/phonegap-plugin-push/push.gradle (limited to 'StoneIsland/plugins/phonegap-plugin-push/push.gradle') 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 -- cgit v1.2.3-70-g09d2