@nativescript/android 8.8.0-alpha.7 → 8.8.0-alpha.9

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") ? targetSdk : NS_DEFAULT_COMPILE_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 {
@@ -725,6 +726,162 @@ task buildMetadata(type: BuildToolTask) {
725
726
  dependsOn ':android-metadata-generator:jar'
726
727
  }
727
728
 
729
+
730
+
731
+ android.applicationVariants.all { variant ->
732
+ def buildTypeName = variant.buildType.name.capitalize()
733
+ def mergeShadersTaskName = "merge${buildTypeName}Shaders"
734
+ def mergeShadersTask = tasks.findByName(mergeShadersTaskName)
735
+
736
+ if (mergeShadersTask) {
737
+ dependsOn mergeShadersTask
738
+ }
739
+
740
+ def compileJavaWithJavacTaskName = "compile${buildTypeName}JavaWithJavac"
741
+ def compileJavaWithJavacTask = tasks.findByName(compileJavaWithJavacTaskName)
742
+
743
+
744
+ if (compileJavaWithJavacTask) {
745
+ dependsOn compileJavaWithJavacTask
746
+ }
747
+
748
+ def compileKotlinTaskName = "compile${buildTypeName}Kotlin"
749
+ def compileKotlinTask = tasks.findByName(compileKotlinTaskName)
750
+
751
+
752
+ if (compileKotlinTask) {
753
+ dependsOn compileKotlinTask
754
+ }
755
+
756
+
757
+ def mergeDexTaskName = "mergeDex${buildTypeName}"
758
+ def mergeDexTask = tasks.findByName(mergeDexTaskName)
759
+
760
+ if (mergeDexTask) {
761
+ dependsOn mergeDexTask
762
+ }
763
+
764
+ def checkDuplicateClassesTaskName = "check${buildTypeName}DuplicateClasses"
765
+ def checkDuplicateClassesTask = tasks.findByName(checkDuplicateClassesTaskName)
766
+
767
+ if (checkDuplicateClassesTask) {
768
+ dependsOn checkDuplicateClassesTask
769
+ }
770
+
771
+ def generateBuildConfigTaskName = "generate${buildTypeName}BuildConfig"
772
+ def generateBuildConfigTask = tasks.findByName(generateBuildConfigTaskName)
773
+
774
+ if (generateBuildConfigTask) {
775
+ dependsOn generateBuildConfigTask
776
+ }
777
+
778
+ def dexBuilderTaskName = "dexBuilder${buildTypeName}"
779
+ def dexBuilderTask = tasks.findByName(dexBuilderTaskName)
780
+
781
+ if (dexBuilderTask) {
782
+ dependsOn dexBuilderTask
783
+ }
784
+
785
+
786
+ def mergeExtDexTaskName = "mergeExtDex${buildTypeName}"
787
+ def mergeExtDexTask = tasks.findByName(mergeExtDexTaskName)
788
+
789
+ if (mergeExtDexTask) {
790
+ dependsOn mergeExtDexTask
791
+ }
792
+
793
+ def mergeLibDexTaskName = "mergeLibDex${buildTypeName}"
794
+ def mergeLibDexTask = tasks.findByName(mergeLibDexTaskName)
795
+
796
+ if (mergeLibDexTask) {
797
+ dependsOn mergeLibDexTask
798
+ }
799
+
800
+ def mergeProjectDexTaskName = "mergeProjectDex${buildTypeName}"
801
+ def mergeProjectDexTask = tasks.findByName(mergeProjectDexTaskName)
802
+
803
+ if (mergeProjectDexTask) {
804
+ dependsOn mergeProjectDexTask
805
+ }
806
+
807
+ def syncLibJarsTaskName = "sync${buildTypeName}LibJars"
808
+ def syncLibJarsTask = tasks.findByName(syncLibJarsTaskName)
809
+
810
+ if (syncLibJarsTask) {
811
+ dependsOn syncLibJarsTask
812
+ }
813
+
814
+ def mergeJavaResourceTaskName = "merge${buildTypeName}JavaResource"
815
+ def mergeJavaResourceTask = tasks.findByName(mergeJavaResourceTaskName)
816
+
817
+ if (mergeJavaResourceTask) {
818
+ dependsOn mergeJavaResourceTask
819
+ }
820
+
821
+ def mergeJniLibFoldersTaskName = "merge${buildTypeName}JniLibFolders"
822
+ def mergeJniLibFoldersTask = tasks.findByName(mergeJniLibFoldersTaskName)
823
+
824
+ if (mergeJniLibFoldersTask) {
825
+ dependsOn mergeJniLibFoldersTask
826
+ }
827
+
828
+ def mergeNativeLibsTaskName = "merge${buildTypeName}NativeLibs"
829
+ def mergeNativeLibsTask = tasks.findByName(mergeNativeLibsTaskName)
830
+
831
+ if (mergeNativeLibsTask) {
832
+ dependsOn mergeNativeLibsTask
833
+ }
834
+
835
+ def stripDebugSymbolsTaskName = "strip${buildTypeName}DebugSymbols"
836
+ def stripDebugSymbolsTask = tasks.findByName(stripDebugSymbolsTaskName)
837
+
838
+ if (stripDebugSymbolsTask) {
839
+ dependsOn stripDebugSymbolsTask
840
+ }
841
+
842
+ def validateSigningTaskName = "validateSigning${buildTypeName}"
843
+ def validateSigningTask = tasks.findByName(validateSigningTaskName)
844
+
845
+ if (validateSigningTask) {
846
+ dependsOn validateSigningTask
847
+ }
848
+
849
+
850
+ def extractProguardFilesTaskName = "extractProguardFiles"
851
+ def extractProguardFilesTask = tasks.findByName(extractProguardFilesTaskName)
852
+
853
+ if (extractProguardFilesTask) {
854
+ dependsOn extractProguardFilesTask
855
+ }
856
+
857
+
858
+ def compileArtProfileTaskName = "compile${buildTypeName}ArtProfile"
859
+ def compileArtProfileTask = tasks.findByName(compileArtProfileTaskName)
860
+
861
+ if (compileArtProfileTask) {
862
+ dependsOn compileArtProfileTask
863
+ }
864
+
865
+
866
+ def extractNativeSymbolTablesTaskName = "extract${buildTypeName}NativeSymbolTables"
867
+ def extractNativeSymbolTablesTask = tasks.findByName(extractNativeSymbolTablesTaskName)
868
+
869
+ if (extractNativeSymbolTablesTask) {
870
+ dependsOn extractNativeSymbolTablesTask
871
+ }
872
+
873
+
874
+ def optimizeResourcesTaskName = "optimize${buildTypeName}Resources"
875
+ def optimizeResourcesTask = tasks.findByName(optimizeResourcesTaskName)
876
+
877
+ if (optimizeResourcesTask) {
878
+ dependsOn optimizeResourcesTask
879
+ }
880
+
881
+
882
+
883
+ }
884
+
728
885
  dependsOn copyMetadataFilters
729
886
 
730
887
  // As some external gradle plugins can reorder the execution order of the tasks it may happen that buildMetadata is executed after merge{Debug/Release}Assets
@@ -955,26 +1112,33 @@ cleanSbg.dependsOn(cleanMdg)
955
1112
  clean.dependsOn(cleanSbg)
956
1113
 
957
1114
 
1115
+ //dependsOn {
1116
+ // pattern {
1117
+ // include "merge*.Shaders" // Matches tasks starting with "merge" and ending with "Shaders"
1118
+ // }
1119
+ //}
1120
+
1121
+
958
1122
  tasks.configureEach({ DefaultTask currentTask ->
959
- // println "\t ~ [DEBUG][app] build.gradle - currentTask = ${currentTask.name}..."
960
- if (currentTask =~ /generate.+BuildConfig/) {
961
- currentTask.finalizedBy(extractAllJars)
962
- extractAllJars.finalizedBy(collectAllJars)
963
- }
1123
+ // println "\t ~ [DEBUG][app] build.gradle - currentTask = ${currentTask.name} ..."
1124
+
964
1125
  if (currentTask =~ /compile.+JavaWithJavac/) {
965
1126
  currentTask.dependsOn(runSbg)
966
- currentTask.finalizedBy(buildMetadata)
1127
+ }
1128
+
1129
+ if (currentTask =~ /mergeDex.+/) {
1130
+ currentTask.dependsOn(runSbg)
967
1131
  }
968
1132
 
969
1133
  if (currentTask =~ /compile.+Kotlin.+/) {
970
1134
  currentTask.dependsOn(runSbg)
971
- currentTask.finalizedBy(buildMetadata)
972
1135
  }
973
1136
 
974
1137
  if (currentTask =~ /merge.*Assets/) {
975
1138
  currentTask.dependsOn(buildMetadata)
976
1139
  }
977
- // ensure buildMetadata is done before R8 to allow custom proguard from metadata
1140
+
1141
+ // // ensure buildMetadata is done before R8 to allow custom proguard from metadata
978
1142
  if (currentTask =~ /minify.*WithR8/) {
979
1143
  buildMetadata.finalizedBy(currentTask)
980
1144
  }
@@ -986,168 +1150,131 @@ tasks.configureEach({ DefaultTask currentTask ->
986
1150
  cleanupAllJars.dependsOn(currentTask)
987
1151
  }
988
1152
 
989
- if (currentTask =~ /merge.+Shaders/) {
990
- currentTask.dependsOn(runSbg)
991
- currentTask.finalizedBy(buildMetadata)
992
- }
993
-
994
- if (currentTask =~ /mergeDex.+/) {
995
- currentTask.dependsOn(runSbg)
996
- currentTask.finalizedBy(buildMetadata)
997
- }
998
-
999
- if (currentTask =~ /dexBuilder.+/) {
1000
- currentTask.finalizedBy(buildMetadata)
1001
- }
1002
-
1003
- if (currentTask =~ /extract.+NativeSymbolTables/) {
1004
- currentTask.finalizedBy(buildMetadata)
1005
- }
1006
-
1007
- if (currentTask =~ /mergeExtDex.+/) {
1008
- currentTask.finalizedBy(buildMetadata)
1009
- }
1010
-
1011
- if (currentTask =~ /mergeLibDex.+/) {
1012
- currentTask.finalizedBy(buildMetadata)
1013
- }
1014
-
1015
- if (currentTask =~ /mergeProjectDex.+/) {
1016
- currentTask.finalizedBy(buildMetadata)
1017
- }
1018
-
1019
- if (currentTask =~ /merge.+NativeLibs/) {
1020
- currentTask.finalizedBy(buildMetadata)
1021
- }
1022
-
1023
- if (currentTask =~ /sync.+LibJars/) {
1024
- currentTask.finalizedBy(buildMetadata)
1025
- }
1026
-
1027
- if (currentTask.name == "extractProguardFiles") {
1028
- currentTask.finalizedBy(buildMetadata)
1029
- }
1030
-
1153
+ // if (currentTask.name == "extractProguardFiles") {
1154
+ // currentTask.finalizedBy(buildMetadata)
1155
+ // }
1156
+ //
1031
1157
  if (currentTask =~ /generate.+LintVitalReportModel/) {
1032
- currentTask.finalizedBy(buildMetadata)
1158
+ currentTask.dependsOn(buildMetadata)
1033
1159
  }
1034
1160
 
1035
1161
  if (currentTask =~ /lintVitalAnalyze.+/) {
1036
- currentTask.mustRunAfter(buildMetadata)
1037
- }
1038
-
1039
- if (currentTask =~ /merge.+GlobalSynthetics/) {
1040
- currentTask.finalizedBy(buildMetadata)
1041
- }
1042
-
1043
- if (currentTask =~ /optimize.+Resources/) {
1044
- currentTask.finalizedBy(buildMetadata)
1045
- }
1046
-
1047
- if (currentTask =~ /buildCMake.*/) {
1048
- currentTask.finalizedBy(buildMetadata)
1049
- }
1050
-
1051
- if (currentTask =~ /configureCMake.*/) {
1052
- currentTask.finalizedBy(buildMetadata)
1053
- }
1054
-
1055
- if (currentTask =~ /validateSigning.*/) {
1056
- currentTask.finalizedBy(buildMetadata)
1057
- }
1058
-
1059
- if (currentTask =~ /generate.*LintReportModel/) {
1060
- currentTask.finalizedBy(buildMetadata)
1061
- }
1062
-
1063
- if (currentTask =~ /generate.*AndroidTestResValues/) {
1064
- buildMetadata.dependsOn(currentTask)
1065
- }
1066
-
1067
- if (currentTask =~ /generate.*AndroidTestLintModel/) {
1068
- currentTask.finalizedBy(buildMetadata)
1069
- }
1070
-
1071
- if (currentTask =~ /generate.*UnitTestLintModel/) {
1072
- buildMetadata.mustRunAfter(currentTask)
1073
- }
1074
-
1075
- if (currentTask =~ /generate.*UnitTestLintModel/) {
1076
- currentTask.finalizedBy(buildMetadata)
1077
- }
1078
-
1079
-
1080
- if (currentTask =~ /lintAnalyze.*UnitTest/) {
1081
- currentTask.finalizedBy(buildMetadata)
1082
- }
1083
-
1084
- if (currentTask =~ /process.*JavaRes/) {
1085
- currentTask.finalizedBy(buildMetadata)
1086
- }
1087
-
1088
- if (currentTask =~ /strip.*DebugSymbols/) {
1089
- currentTask.finalizedBy(buildMetadata)
1090
- }
1091
-
1092
- if (currentTask =~ /merge.*JavaResource/) {
1093
- currentTask.finalizedBy(buildMetadata)
1094
- }
1095
-
1096
- if (currentTask =~ /lintAnalyze.*/) {
1097
- currentTask.finalizedBy(buildMetadata)
1098
- }
1099
-
1100
- if (currentTask =~ /lintAnalyze.*AndroidTest/) {
1101
- currentTask.finalizedBy(buildMetadata)
1102
- }
1103
-
1104
- if (currentTask =~ /bundle.*Resources/) {
1105
- currentTask.finalizedBy(buildMetadata)
1106
- }
1107
-
1108
- if (currentTask =~ /compile.*ArtProfile/) {
1109
- currentTask.mustRunAfter(buildMetadata)
1110
- }
1111
-
1112
- if (currentTask =~ /check.*DuplicateClasses/) {
1113
- currentTask.finalizedBy(buildMetadata)
1114
- }
1115
-
1116
- if (currentTask =~ /check.*AarMetadata/) {
1117
- currentTask.finalizedBy(buildMetadata)
1118
- }
1119
-
1120
- if (currentTask =~ /create.*CompatibleScreenManifests/) {
1121
- currentTask.finalizedBy(buildMetadata)
1122
- }
1123
-
1124
- if (currentTask =~ /process.*Manifest/) {
1125
- currentTask.finalizedBy(buildMetadata)
1126
- }
1127
-
1128
- if (currentTask =~ /generate.*ResValues/) {
1129
- currentTask.finalizedBy(buildMetadata)
1130
- }
1131
-
1132
- if (currentTask =~ /merge.*Resources/) {
1133
- currentTask.finalizedBy(buildMetadata)
1134
- }
1135
-
1136
- if (currentTask =~ /package.*Resources/) {
1137
- currentTask.finalizedBy(buildMetadata)
1138
- }
1139
-
1140
- if (currentTask =~ /process.*Resources/) {
1141
- currentTask.finalizedBy(buildMetadata)
1142
- }
1143
-
1144
- if (currentTask =~ /desugar.*Dependencies/) {
1145
- currentTask.finalizedBy(buildMetadata)
1146
- }
1147
-
1148
- if (currentTask =~ /merge.*JniLibFolders/) {
1149
- currentTask.finalizedBy(buildMetadata)
1162
+ currentTask.dependsOn(buildMetadata)
1150
1163
  }
1164
+ //
1165
+ // if (currentTask =~ /merge.+GlobalSynthetics/) {
1166
+ // currentTask.finalizedBy(buildMetadata)
1167
+ // }
1168
+ //
1169
+ // if (currentTask =~ /optimize.+Resources/) {
1170
+ // currentTask.finalizedBy(buildMetadata)
1171
+ // }
1172
+ //
1173
+ // if (currentTask =~ /buildCMake.*/) {
1174
+ // currentTask.finalizedBy(buildMetadata)
1175
+ // }
1176
+ //
1177
+ // if (currentTask =~ /configureCMake.*/) {
1178
+ // currentTask.finalizedBy(buildMetadata)
1179
+ // }
1180
+ //
1181
+ // if (currentTask =~ /validateSigning.*/) {
1182
+ // currentTask.finalizedBy(buildMetadata)
1183
+ // }
1184
+ //
1185
+ // if (currentTask =~ /generate.*LintReportModel/) {
1186
+ // currentTask.finalizedBy(buildMetadata)
1187
+ // }
1188
+ //
1189
+ // if (currentTask =~ /generate.*AndroidTestResValues/) {
1190
+ // // buildMetadata.dependsOn(currentTask)
1191
+ // currentTask.finalizedBy(buildMetadata)
1192
+ // }
1193
+ //
1194
+ // if (currentTask =~ /generate.*AndroidTestLintModel/) {
1195
+ // currentTask.finalizedBy(buildMetadata)
1196
+ // }
1197
+ //
1198
+ // if (currentTask =~ /generate.*UnitTestLintModel/) {
1199
+ // buildMetadata.mustRunAfter(currentTask)
1200
+ // }
1201
+ //
1202
+ // if (currentTask =~ /generate.*UnitTestLintModel/) {
1203
+ // currentTask.finalizedBy(buildMetadata)
1204
+ // }
1205
+ //
1206
+ //
1207
+ // if (currentTask =~ /lintAnalyze.*UnitTest/) {
1208
+ // currentTask.finalizedBy(buildMetadata)
1209
+ // }
1210
+ //
1211
+ // if (currentTask =~ /process.*JavaRes/) {
1212
+ // currentTask.finalizedBy(buildMetadata)
1213
+ // }
1214
+ //
1215
+ // if (currentTask =~ /strip.*DebugSymbols/) {
1216
+ // currentTask.finalizedBy(buildMetadata)
1217
+ // }
1218
+ //
1219
+ // if (currentTask =~ /merge.*JavaResource/) {
1220
+ // currentTask.finalizedBy(buildMetadata)
1221
+ // }
1222
+ //
1223
+ // if (currentTask =~ /lintAnalyze.*/) {
1224
+ // currentTask.finalizedBy(buildMetadata)
1225
+ // }
1226
+ //
1227
+ // if (currentTask =~ /lintAnalyze.*AndroidTest/) {
1228
+ // currentTask.finalizedBy(buildMetadata)
1229
+ // }
1230
+ //
1231
+ // if (currentTask =~ /bundle.*Resources/) {
1232
+ // currentTask.finalizedBy(buildMetadata)
1233
+ // }
1234
+ //
1235
+ // if (currentTask =~ /compile.*ArtProfile/) {
1236
+ // currentTask.mustRunAfter(buildMetadata)
1237
+ // }
1238
+ //
1239
+ // if (currentTask =~ /check.*DuplicateClasses/) {
1240
+ // currentTask.finalizedBy(buildMetadata)
1241
+ // }
1242
+ //
1243
+ // if (currentTask =~ /check.*AarMetadata/) {
1244
+ // currentTask.finalizedBy(buildMetadata)
1245
+ // }
1246
+ //
1247
+ // if (currentTask =~ /create.*CompatibleScreenManifests/) {
1248
+ // currentTask.finalizedBy(buildMetadata)
1249
+ // }
1250
+ //
1251
+ // if (currentTask =~ /process.*Manifest/) {
1252
+ // currentTask.finalizedBy(buildMetadata)
1253
+ // }
1254
+ //
1255
+ // if (currentTask =~ /generate.*ResValues/) {
1256
+ // currentTask.finalizedBy(buildMetadata)
1257
+ // }
1258
+ //
1259
+ // if (currentTask =~ /merge.*Resources/) {
1260
+ // currentTask.finalizedBy(buildMetadata)
1261
+ // }
1262
+ //
1263
+ // if (currentTask =~ /package.*Resources/) {
1264
+ // currentTask.finalizedBy(buildMetadata)
1265
+ // }
1266
+ //
1267
+ // if (currentTask =~ /process.*Resources/) {
1268
+ // currentTask.finalizedBy(buildMetadata)
1269
+ // }
1270
+ //
1271
+ // if (currentTask =~ /desugar.*Dependencies/) {
1272
+ // currentTask.finalizedBy(buildMetadata)
1273
+ // }
1274
+ //
1275
+ // if (currentTask =~ /merge.*JniLibFolders/) {
1276
+ // currentTask.finalizedBy(buildMetadata)
1277
+ // }
1151
1278
 
1152
1279
  })
1153
1280
 
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.7",
4
+ "version": "8.8.0-alpha.9",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/NativeScript/android.git"