@nativescript/android 8.8.0-alpha.1 → 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()
@@ -1005,19 +1029,15 @@ tasks.configureEach({ DefaultTask currentTask ->
1005
1029
  }
1006
1030
 
1007
1031
  if (currentTask =~ /generate.+LintVitalReportModel/) {
1008
- buildMetadata.finalizedBy(currentTask)
1032
+ currentTask.finalizedBy(buildMetadata)
1009
1033
  }
1010
1034
 
1011
1035
  if (currentTask =~ /lintVitalAnalyze.+/) {
1012
- buildMetadata.finalizedBy(currentTask)
1013
- }
1014
-
1015
- if (currentTask =~ /extract.+NativeSymbolTables/) {
1016
- buildMetadata.finalizedBy(currentTask)
1036
+ currentTask.mustRunAfter(buildMetadata)
1017
1037
  }
1018
1038
 
1019
1039
  if (currentTask =~ /merge.+GlobalSynthetics/) {
1020
- buildMetadata.finalizedBy(currentTask)
1040
+ currentTask.finalizedBy(buildMetadata)
1021
1041
  }
1022
1042
 
1023
1043
  if (currentTask =~ /optimize.+Resources/) {
@@ -1037,23 +1057,19 @@ tasks.configureEach({ DefaultTask currentTask ->
1037
1057
  }
1038
1058
 
1039
1059
  if (currentTask =~ /generate.*LintReportModel/) {
1040
- buildMetadata.finalizedBy(currentTask)
1041
- }
1042
-
1043
- if (currentTask.name.contains(":runtime:configureCMakeRelWithDebInfo")) {
1044
1060
  currentTask.finalizedBy(buildMetadata)
1045
1061
  }
1046
1062
 
1047
1063
  if (currentTask =~ /generate.*AndroidTestResValues/) {
1048
- buildMetadata.finalizedBy(currentTask)
1064
+ buildMetadata.dependsOn(currentTask)
1049
1065
  }
1050
1066
 
1051
1067
  if (currentTask =~ /generate.*AndroidTestLintModel/) {
1052
- buildMetadata.finalizedBy(currentTask)
1068
+ currentTask.finalizedBy(buildMetadata)
1053
1069
  }
1054
1070
 
1055
1071
  if (currentTask =~ /generate.*UnitTestLintModel/) {
1056
- currentTask.finalizedBy(buildMetadata)
1072
+ buildMetadata.mustRunAfter(currentTask)
1057
1073
  }
1058
1074
 
1059
1075
  if (currentTask =~ /generate.*UnitTestLintModel/) {
@@ -1077,12 +1093,12 @@ tasks.configureEach({ DefaultTask currentTask ->
1077
1093
  currentTask.finalizedBy(buildMetadata)
1078
1094
  }
1079
1095
 
1080
- if (currentTask.name == ":runtime:lintAnalyzeDebugAndroidTest" || currentTask.name == ":runtime:lintAnalyzeReleaseAndroidTest") {
1096
+ if (currentTask =~ /lintAnalyze.*/) {
1081
1097
  currentTask.finalizedBy(buildMetadata)
1082
1098
  }
1083
1099
 
1084
- if (currentTask.name == "lintAnalyzeDebug" || currentTask.name == "lintAnalyzeRelease") {
1085
- buildMetadata.finalizedBy(currentTask)
1100
+ if (currentTask =~ /lintAnalyze.*AndroidTest/) {
1101
+ currentTask.finalizedBy(buildMetadata)
1086
1102
  }
1087
1103
 
1088
1104
  if (currentTask =~ /bundle.*Resources/) {
@@ -1090,7 +1106,7 @@ tasks.configureEach({ DefaultTask currentTask ->
1090
1106
  }
1091
1107
 
1092
1108
  if (currentTask =~ /compile.*ArtProfile/) {
1093
- currentTask.finalizedBy(buildMetadata)
1109
+ currentTask.mustRunAfter(buildMetadata)
1094
1110
  }
1095
1111
 
1096
1112
  })
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.1",
4
+ "version": "8.8.0-alpha.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/NativeScript/android.git"