@nativescript/android 8.8.0-alpha.8 → 8.8.0-next.2024-07-02-9768688544

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.
@@ -79,6 +79,7 @@ def allJarLibraries = new LinkedList<String>()
79
79
 
80
80
  def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : NS_DEFAULT_COMPILE_SDK_VERSION as int }
81
81
  def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : NS_DEFAULT_COMPILE_SDK_VERSION as int }
82
+ def computeMinSdkVersion = { -> project.hasProperty("minSdk") ? minSdk : NS_DEFAULT_MIN_SDK_VERSION as int }
82
83
  def computeBuildToolsVersion = { ->
83
84
  project.hasProperty("buildToolsVersion") ? buildToolsVersion : NS_DEFAULT_BUILD_TOOLS_VERSION as String
84
85
  }
@@ -217,7 +218,7 @@ android {
217
218
 
218
219
  defaultConfig {
219
220
  def manifest = new XmlSlurper().parse(file(android.sourceSets.main.manifest.srcFile))
220
- def minSdkVer = manifest."uses-sdk"."@android:minSdkVersion".text() ?: NS_DEFAULT_MIN_SDK_VERSION
221
+ def minSdkVer = manifest."uses-sdk"."@android:minSdkVersion".text() ?: computeMinSdkVersion()
221
222
  minSdkVersion minSdkVer
222
223
  targetSdkVersion computeTargetSdkVersion()
223
224
  ndk {
@@ -687,9 +688,13 @@ task 'collectAllJars' {
687
688
  }
688
689
  }
689
690
 
690
- task copyMetadataFilters(type: Copy) {
691
- from "$rootDir/whitelist.mdg", "$rootDir/blacklist.mdg"
692
- into "$BUILD_TOOLS_PATH"
691
+ task copyMetadataFilters {
692
+ outputs.files("$BUILD_TOOLS_PATH/whitelist.mdg", "$BUILD_TOOLS_PATH/blacklist.mdg")
693
+ // use an explicit copy task here because the copy task itselfs marks the whole built-tools as an output!
694
+ copy {
695
+ from file("$rootDir/whitelist.mdg"), file("$rootDir/blacklist.mdg")
696
+ into "$BUILD_TOOLS_PATH"
697
+ }
693
698
  }
694
699
 
695
700
  task 'copyMetadata' {
@@ -809,6 +814,81 @@ task buildMetadata(type: BuildToolTask) {
809
814
  if (syncLibJarsTask) {
810
815
  dependsOn syncLibJarsTask
811
816
  }
817
+
818
+ def mergeJavaResourceTaskName = "merge${buildTypeName}JavaResource"
819
+ def mergeJavaResourceTask = tasks.findByName(mergeJavaResourceTaskName)
820
+
821
+ if (mergeJavaResourceTask) {
822
+ dependsOn mergeJavaResourceTask
823
+ }
824
+
825
+ def mergeJniLibFoldersTaskName = "merge${buildTypeName}JniLibFolders"
826
+ def mergeJniLibFoldersTask = tasks.findByName(mergeJniLibFoldersTaskName)
827
+
828
+ if (mergeJniLibFoldersTask) {
829
+ dependsOn mergeJniLibFoldersTask
830
+ }
831
+
832
+ def mergeNativeLibsTaskName = "merge${buildTypeName}NativeLibs"
833
+ def mergeNativeLibsTask = tasks.findByName(mergeNativeLibsTaskName)
834
+
835
+ if (mergeNativeLibsTask) {
836
+ dependsOn mergeNativeLibsTask
837
+ }
838
+
839
+ def stripDebugSymbolsTaskName = "strip${buildTypeName}DebugSymbols"
840
+ def stripDebugSymbolsTask = tasks.findByName(stripDebugSymbolsTaskName)
841
+
842
+ if (stripDebugSymbolsTask) {
843
+ dependsOn stripDebugSymbolsTask
844
+ }
845
+
846
+ def validateSigningTaskName = "validateSigning${buildTypeName}"
847
+ def validateSigningTask = tasks.findByName(validateSigningTaskName)
848
+
849
+ if (validateSigningTask) {
850
+ dependsOn validateSigningTask
851
+ }
852
+
853
+
854
+ def extractProguardFilesTaskName = "extractProguardFiles"
855
+ def extractProguardFilesTask = tasks.findByName(extractProguardFilesTaskName)
856
+
857
+ if (extractProguardFilesTask) {
858
+ dependsOn extractProguardFilesTask
859
+ }
860
+
861
+
862
+ def compileArtProfileTaskName = "compile${buildTypeName}ArtProfile"
863
+ def compileArtProfileTask = tasks.findByName(compileArtProfileTaskName)
864
+
865
+ if (compileArtProfileTask) {
866
+ dependsOn compileArtProfileTask
867
+ }
868
+
869
+
870
+ def extractNativeSymbolTablesTaskName = "extract${buildTypeName}NativeSymbolTables"
871
+ def extractNativeSymbolTablesTask = tasks.findByName(extractNativeSymbolTablesTaskName)
872
+
873
+ if (extractNativeSymbolTablesTask) {
874
+ dependsOn extractNativeSymbolTablesTask
875
+ }
876
+
877
+
878
+ def optimizeResourcesTaskName = "optimize${buildTypeName}Resources"
879
+ def optimizeResourcesTask = tasks.findByName(optimizeResourcesTaskName)
880
+
881
+ if (optimizeResourcesTask) {
882
+ dependsOn optimizeResourcesTask
883
+ }
884
+
885
+ def bundleResourcesTaskName = "bundle${buildTypeName}Resources"
886
+ def bundleResourcesTask = tasks.findByName(bundleResourcesTaskName)
887
+
888
+ if (bundleResourcesTask) {
889
+ dependsOn bundleResourcesTask
890
+ }
891
+
812
892
  }
813
893
 
814
894
  dependsOn copyMetadataFilters
@@ -826,7 +906,9 @@ task buildMetadata(type: BuildToolTask) {
826
906
  inputs.files("$MDG_JAVA_DEPENDENCIES")
827
907
 
828
908
  // make MDG aware of whitelist.mdg and blacklist.mdg files
829
- inputs.files(project.fileTree(dir: "$rootDir", include: "**/*.mdg"))
909
+ // inputs.files(project.fileTree(dir: "$rootDir", include: "**/*.mdg"))
910
+ // use explicit inputs as the above makes the whole build-tools directory an input!
911
+ inputs.files("$BUILD_TOOLS_PATH/whitelist.mdg", "$BUILD_TOOLS_PATH/blacklist.mdg")
830
912
 
831
913
  def classesDir = layout.buildDirectory.dir("intermediates/javac").get().asFile
832
914
  if (classesDir.exists()) {
@@ -1079,131 +1161,131 @@ tasks.configureEach({ DefaultTask currentTask ->
1079
1161
  cleanupAllJars.dependsOn(currentTask)
1080
1162
  }
1081
1163
 
1082
- if (currentTask.name == "extractProguardFiles") {
1083
- currentTask.finalizedBy(buildMetadata)
1084
- }
1085
-
1164
+ // if (currentTask.name == "extractProguardFiles") {
1165
+ // currentTask.finalizedBy(buildMetadata)
1166
+ // }
1167
+ //
1086
1168
  if (currentTask =~ /generate.+LintVitalReportModel/) {
1087
- currentTask.finalizedBy(buildMetadata)
1169
+ currentTask.dependsOn(buildMetadata)
1088
1170
  }
1089
1171
 
1090
1172
  if (currentTask =~ /lintVitalAnalyze.+/) {
1091
- currentTask.mustRunAfter(buildMetadata)
1092
- }
1093
-
1094
- if (currentTask =~ /merge.+GlobalSynthetics/) {
1095
- currentTask.finalizedBy(buildMetadata)
1096
- }
1097
-
1098
- if (currentTask =~ /optimize.+Resources/) {
1099
- currentTask.finalizedBy(buildMetadata)
1100
- }
1101
-
1102
- if (currentTask =~ /buildCMake.*/) {
1103
- currentTask.finalizedBy(buildMetadata)
1104
- }
1105
-
1106
- if (currentTask =~ /configureCMake.*/) {
1107
- currentTask.finalizedBy(buildMetadata)
1108
- }
1109
-
1110
- if (currentTask =~ /validateSigning.*/) {
1111
- currentTask.finalizedBy(buildMetadata)
1112
- }
1113
-
1114
- if (currentTask =~ /generate.*LintReportModel/) {
1115
- currentTask.finalizedBy(buildMetadata)
1116
- }
1117
-
1118
- if (currentTask =~ /generate.*AndroidTestResValues/) {
1119
- // buildMetadata.dependsOn(currentTask)
1120
- currentTask.finalizedBy(buildMetadata)
1121
- }
1122
-
1123
- if (currentTask =~ /generate.*AndroidTestLintModel/) {
1124
- currentTask.finalizedBy(buildMetadata)
1125
- }
1126
-
1127
- if (currentTask =~ /generate.*UnitTestLintModel/) {
1128
- buildMetadata.mustRunAfter(currentTask)
1129
- }
1130
-
1131
- if (currentTask =~ /generate.*UnitTestLintModel/) {
1132
- currentTask.finalizedBy(buildMetadata)
1133
- }
1134
-
1135
-
1136
- if (currentTask =~ /lintAnalyze.*UnitTest/) {
1137
- currentTask.finalizedBy(buildMetadata)
1138
- }
1139
-
1140
- if (currentTask =~ /process.*JavaRes/) {
1141
- currentTask.finalizedBy(buildMetadata)
1142
- }
1143
-
1144
- if (currentTask =~ /strip.*DebugSymbols/) {
1145
- currentTask.finalizedBy(buildMetadata)
1146
- }
1147
-
1148
- if (currentTask =~ /merge.*JavaResource/) {
1149
- currentTask.finalizedBy(buildMetadata)
1150
- }
1151
-
1152
- if (currentTask =~ /lintAnalyze.*/) {
1153
- currentTask.finalizedBy(buildMetadata)
1154
- }
1155
-
1156
- if (currentTask =~ /lintAnalyze.*AndroidTest/) {
1157
- currentTask.finalizedBy(buildMetadata)
1158
- }
1159
-
1160
- if (currentTask =~ /bundle.*Resources/) {
1161
- currentTask.finalizedBy(buildMetadata)
1162
- }
1163
-
1164
- if (currentTask =~ /compile.*ArtProfile/) {
1165
- currentTask.mustRunAfter(buildMetadata)
1166
- }
1167
-
1168
- if (currentTask =~ /check.*DuplicateClasses/) {
1169
- currentTask.finalizedBy(buildMetadata)
1170
- }
1171
-
1172
- if (currentTask =~ /check.*AarMetadata/) {
1173
- currentTask.finalizedBy(buildMetadata)
1174
- }
1175
-
1176
- if (currentTask =~ /create.*CompatibleScreenManifests/) {
1177
- currentTask.finalizedBy(buildMetadata)
1178
- }
1179
-
1180
- if (currentTask =~ /process.*Manifest/) {
1181
- currentTask.finalizedBy(buildMetadata)
1182
- }
1183
-
1184
- if (currentTask =~ /generate.*ResValues/) {
1185
- currentTask.finalizedBy(buildMetadata)
1186
- }
1187
-
1188
- if (currentTask =~ /merge.*Resources/) {
1189
- currentTask.finalizedBy(buildMetadata)
1190
- }
1191
-
1192
- if (currentTask =~ /package.*Resources/) {
1193
- currentTask.finalizedBy(buildMetadata)
1194
- }
1195
-
1196
- if (currentTask =~ /process.*Resources/) {
1197
- currentTask.finalizedBy(buildMetadata)
1198
- }
1199
-
1200
- if (currentTask =~ /desugar.*Dependencies/) {
1201
- currentTask.finalizedBy(buildMetadata)
1202
- }
1203
-
1204
- if (currentTask =~ /merge.*JniLibFolders/) {
1205
- currentTask.finalizedBy(buildMetadata)
1173
+ currentTask.dependsOn(buildMetadata)
1206
1174
  }
1175
+ //
1176
+ // if (currentTask =~ /merge.+GlobalSynthetics/) {
1177
+ // currentTask.finalizedBy(buildMetadata)
1178
+ // }
1179
+ //
1180
+ // if (currentTask =~ /optimize.+Resources/) {
1181
+ // currentTask.finalizedBy(buildMetadata)
1182
+ // }
1183
+ //
1184
+ // if (currentTask =~ /buildCMake.*/) {
1185
+ // currentTask.finalizedBy(buildMetadata)
1186
+ // }
1187
+ //
1188
+ // if (currentTask =~ /configureCMake.*/) {
1189
+ // currentTask.finalizedBy(buildMetadata)
1190
+ // }
1191
+ //
1192
+ // if (currentTask =~ /validateSigning.*/) {
1193
+ // currentTask.finalizedBy(buildMetadata)
1194
+ // }
1195
+ //
1196
+ // if (currentTask =~ /generate.*LintReportModel/) {
1197
+ // currentTask.finalizedBy(buildMetadata)
1198
+ // }
1199
+ //
1200
+ // if (currentTask =~ /generate.*AndroidTestResValues/) {
1201
+ // // buildMetadata.dependsOn(currentTask)
1202
+ // currentTask.finalizedBy(buildMetadata)
1203
+ // }
1204
+ //
1205
+ // if (currentTask =~ /generate.*AndroidTestLintModel/) {
1206
+ // currentTask.finalizedBy(buildMetadata)
1207
+ // }
1208
+ //
1209
+ // if (currentTask =~ /generate.*UnitTestLintModel/) {
1210
+ // buildMetadata.mustRunAfter(currentTask)
1211
+ // }
1212
+ //
1213
+ // if (currentTask =~ /generate.*UnitTestLintModel/) {
1214
+ // currentTask.finalizedBy(buildMetadata)
1215
+ // }
1216
+ //
1217
+ //
1218
+ // if (currentTask =~ /lintAnalyze.*UnitTest/) {
1219
+ // currentTask.finalizedBy(buildMetadata)
1220
+ // }
1221
+ //
1222
+ // if (currentTask =~ /process.*JavaRes/) {
1223
+ // currentTask.finalizedBy(buildMetadata)
1224
+ // }
1225
+ //
1226
+ // if (currentTask =~ /strip.*DebugSymbols/) {
1227
+ // currentTask.finalizedBy(buildMetadata)
1228
+ // }
1229
+ //
1230
+ // if (currentTask =~ /merge.*JavaResource/) {
1231
+ // currentTask.finalizedBy(buildMetadata)
1232
+ // }
1233
+ //
1234
+ // if (currentTask =~ /lintAnalyze.*/) {
1235
+ // currentTask.finalizedBy(buildMetadata)
1236
+ // }
1237
+ //
1238
+ // if (currentTask =~ /lintAnalyze.*AndroidTest/) {
1239
+ // currentTask.finalizedBy(buildMetadata)
1240
+ // }
1241
+ //
1242
+ // if (currentTask =~ /bundle.*Resources/) {
1243
+ // currentTask.finalizedBy(buildMetadata)
1244
+ // }
1245
+ //
1246
+ // if (currentTask =~ /compile.*ArtProfile/) {
1247
+ // currentTask.mustRunAfter(buildMetadata)
1248
+ // }
1249
+ //
1250
+ // if (currentTask =~ /check.*DuplicateClasses/) {
1251
+ // currentTask.finalizedBy(buildMetadata)
1252
+ // }
1253
+ //
1254
+ // if (currentTask =~ /check.*AarMetadata/) {
1255
+ // currentTask.finalizedBy(buildMetadata)
1256
+ // }
1257
+ //
1258
+ // if (currentTask =~ /create.*CompatibleScreenManifests/) {
1259
+ // currentTask.finalizedBy(buildMetadata)
1260
+ // }
1261
+ //
1262
+ // if (currentTask =~ /process.*Manifest/) {
1263
+ // currentTask.finalizedBy(buildMetadata)
1264
+ // }
1265
+ //
1266
+ // if (currentTask =~ /generate.*ResValues/) {
1267
+ // currentTask.finalizedBy(buildMetadata)
1268
+ // }
1269
+ //
1270
+ // if (currentTask =~ /merge.*Resources/) {
1271
+ // currentTask.finalizedBy(buildMetadata)
1272
+ // }
1273
+ //
1274
+ // if (currentTask =~ /package.*Resources/) {
1275
+ // currentTask.finalizedBy(buildMetadata)
1276
+ // }
1277
+ //
1278
+ // if (currentTask =~ /process.*Resources/) {
1279
+ // currentTask.finalizedBy(buildMetadata)
1280
+ // }
1281
+ //
1282
+ // if (currentTask =~ /desugar.*Dependencies/) {
1283
+ // currentTask.finalizedBy(buildMetadata)
1284
+ // }
1285
+ //
1286
+ // if (currentTask =~ /merge.*JniLibFolders/) {
1287
+ // currentTask.finalizedBy(buildMetadata)
1288
+ // }
1207
1289
 
1208
1290
  })
1209
1291
 
@@ -170,6 +170,8 @@
170
170
  Object.defineProperty(global, "__extends", { value: __extends });
171
171
  Object.defineProperty(global, "__decorate", { value: __decorate });
172
172
 
173
- global.JavaProxy = JavaProxy;
173
+ if (!global.__ns__worker) {
174
+ global.JavaProxy = JavaProxy;
175
+ }
174
176
  global.Interfaces = Interfaces;
175
177
  })()
@@ -190,7 +190,7 @@ public final class RuntimeHelper {
190
190
  waitForLiveSync(context);
191
191
  }
192
192
 
193
- runtime.runScript(new File(appDir, "internal/ts_helpers.js"));
193
+ // runtime.runScript(new File(appDir, "internal/ts_helpers.js"));
194
194
 
195
195
  File javaClassesModule = new File(appDir, "app/tns-java-classes.js");
196
196
  if (javaClassesModule.exists()) {