@nativescript/android 8.8.0-alpha.2 → 8.8.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,6 +65,7 @@ def SBG_BINDINGS_NAME = "sbg-bindings.txt"
65
65
  def SBG_INTERFACE_NAMES = "sbg-interface-names.txt"
66
66
  def INPUT_JS_DIR = "$projectDir/src/main/assets/app"
67
67
  def OUTPUT_JAVA_DIR = "$projectDir/src/main/java"
68
+ def APP_DIR = "$projectDir/src/main/assets/app"
68
69
 
69
70
  //metadata generator
70
71
  def MDG_OUTPUT_DIR = "mdg-output-dir.txt"
@@ -179,7 +180,31 @@ def setAppIdentifier = { ->
179
180
  }
180
181
  }
181
182
 
183
+ def computeNamespace = { ->
184
+ def appPackageJsonFile = file("${APP_DIR}/$PACKAGE_JSON")
185
+
186
+ if (appPackageJsonFile.exists()) {
187
+ def content = appPackageJsonFile.getText("UTF-8")
188
+
189
+ def jsonSlurper = new JsonSlurper()
190
+ def packageJsonMap = jsonSlurper.parseText(content)
191
+
192
+ def appIdentifier = ""
193
+
194
+ if (packageJsonMap && packageJsonMap.id) {
195
+ appIdentifier = packageJsonMap.id
196
+ }
197
+
198
+
199
+ if (appIdentifier) {
200
+ return appIdentifier
201
+ }
202
+ }
203
+ return "com.tns.testapplication"
204
+ }
205
+
182
206
  android {
207
+ namespace computeNamespace()
183
208
 
184
209
  applyBeforePluginGradleConfiguration()
185
210
 
@@ -235,7 +260,6 @@ android {
235
260
  }
236
261
  }
237
262
 
238
- namespace "com.tns.testapplication"
239
263
  setAppIdentifier()
240
264
  applyPluginGradleConfigurations()
241
265
  applyAppGradleConfiguration()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nativescript/android",
3
3
  "description": "NativeScript for Android using v8",
4
- "version": "8.8.0-alpha.2",
4
+ "version": "8.8.0-alpha.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/NativeScript/android.git"