@nativescript/android 8.7.0 → 8.8.0-alpha.1

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.
@@ -20,9 +20,8 @@
20
20
  * -PappResourcesPath=[app_resources_path]
21
21
  */
22
22
 
23
-
24
- import groovy.io.FileType
25
23
  import groovy.json.JsonSlurper
24
+ import groovy.xml.XmlSlurper
26
25
  import org.apache.commons.io.FileUtils
27
26
 
28
27
  import javax.inject.Inject
@@ -30,26 +29,17 @@ import java.nio.file.Files
30
29
  import java.nio.file.Paths
31
30
  import java.nio.file.StandardCopyOption
32
31
  import java.security.MessageDigest
33
-
34
32
  import java.util.jar.JarEntry
35
33
  import java.util.jar.JarFile
36
34
 
37
35
  import static org.gradle.internal.logging.text.StyledTextOutput.Style
38
- import java.util.stream.Collectors;
39
- import java.util.stream.Stream;
40
-
41
36
 
42
37
  apply plugin: "com.android.application"
43
38
  apply from: "gradle-helpers/BuildToolTask.gradle"
44
39
  apply from: "gradle-helpers/CustomExecutionLogger.gradle"
45
40
  apply from: "gradle-helpers/AnalyticsCollector.gradle"
46
-
47
- def enableKotlin = (project.hasProperty("useKotlin") && project.useKotlin == "true")
48
-
49
- if (enableKotlin) {
50
- apply plugin: 'kotlin-android'
51
- apply plugin: 'kotlin-parcelize'
52
- }
41
+ apply plugin: 'kotlin-android'
42
+ apply plugin: 'kotlin-parcelize'
53
43
 
54
44
  def onlyX86 = project.hasProperty("onlyX86")
55
45
  if (onlyX86) {
@@ -86,7 +76,6 @@ def METADATA_JAVA_OUT = "mdg-java-out.txt"
86
76
  def pluginsJarLibraries = new LinkedList<String>()
87
77
  def allJarLibraries = new LinkedList<String>()
88
78
 
89
- def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${ns_default_kotlin_version}" }
90
79
  def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : NS_DEFAULT_COMPILE_SDK_VERSION as int }
91
80
  def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : NS_DEFAULT_COMPILE_SDK_VERSION as int }
92
81
  def computeBuildToolsVersion = { ->
@@ -98,7 +87,7 @@ def enableVerboseMDG = project.gradle.startParameter.logLevel.name() == 'DEBUG'
98
87
  def analyticsFilePath = "$rootDir/analytics/build-statistics.json"
99
88
  def analyticsCollector = project.ext.AnalyticsCollector.withOutputPath(analyticsFilePath)
100
89
  if (enableAnalytics) {
101
- analyticsCollector.markUseKotlinPropertyInApp(enableKotlin)
90
+ analyticsCollector.markUseKotlinPropertyInApp(true)
102
91
  analyticsCollector.writeAnalyticsFile()
103
92
  }
104
93
 
@@ -185,6 +174,7 @@ def setAppIdentifier = { ->
185
174
  if (appIdentifier) {
186
175
  project.ext.nsApplicationIdentifier = appIdentifier
187
176
  android.defaultConfig.applicationId = appIdentifier
177
+ android.namespace = appIdentifier
188
178
  }
189
179
  }
190
180
  }
@@ -193,14 +183,12 @@ android {
193
183
 
194
184
  applyBeforePluginGradleConfiguration()
195
185
 
196
- if (enableKotlin) {
197
- kotlinOptions {
198
- jvmTarget = '1.8'
199
- }
186
+ kotlinOptions {
187
+ jvmTarget = '17'
200
188
  }
201
189
 
202
- compileSdkVersion computeCompileSdkVersion()
203
- buildToolsVersion computeBuildToolsVersion()
190
+ compileSdk computeCompileSdkVersion()
191
+ buildToolsVersion = computeBuildToolsVersion()
204
192
 
205
193
  defaultConfig {
206
194
  def manifest = new XmlSlurper().parse(file(android.sourceSets.main.manifest.srcFile))
@@ -217,8 +205,8 @@ android {
217
205
  }
218
206
 
219
207
  compileOptions {
220
- sourceCompatibility JavaVersion.VERSION_1_8
221
- targetCompatibility JavaVersion.VERSION_1_8
208
+ sourceCompatibility JavaVersion.VERSION_17
209
+ targetCompatibility JavaVersion.VERSION_17
222
210
  }
223
211
 
224
212
  sourceSets.main {
@@ -247,17 +235,18 @@ android {
247
235
  }
248
236
  }
249
237
 
238
+ namespace "com.tns.testapplication"
250
239
  setAppIdentifier()
251
240
  applyPluginGradleConfigurations()
252
241
  applyAppGradleConfiguration()
253
242
 
254
243
  def initializeMergedAssetsOutputPath = { ->
255
- android.applicationVariants.all { variant ->
244
+ android.applicationVariants.configureEach { variant ->
256
245
  if (variant.buildType.name == project.selectedBuildType) {
257
246
  def task
258
247
  if (variant.metaClass.respondsTo(variant, "getMergeAssetsProvider")) {
259
248
  def provider = variant.getMergeAssetsProvider()
260
- task = provider.get();
249
+ task = provider.get()
261
250
  } else {
262
251
  // fallback for older android gradle plugin versions
263
252
  task = variant.getMergeAssets()
@@ -265,7 +254,7 @@ android {
265
254
  for (File file : task.getOutputs().getFiles()) {
266
255
  if (!file.getPath().contains("${File.separator}incremental${File.separator}")) {
267
256
  project.ext.mergedAssetsOutputPath = file.getPath()
268
- break;
257
+ break
269
258
  }
270
259
  }
271
260
  }
@@ -395,18 +384,13 @@ dependencies {
395
384
  implementation project(':runtime')
396
385
  }
397
386
 
398
- def kotlinVersion = computeKotlinVersion()
399
- if (enableKotlin) {
400
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
401
- }
402
-
403
387
  }
404
388
 
405
389
  ////////////////////////////////////////////////////////////////////////////////////
406
390
  ///////////////////////////// CONFIGURATION PHASE //////////////////////////////////
407
391
  ////////////////////////////////////////////////////////////////////////////////////
408
392
 
409
- task addDependenciesFromNativeScriptPlugins {
393
+ task 'addDependenciesFromNativeScriptPlugins' {
410
394
  nativescriptDependencies.each { dep ->
411
395
  def aarFiles = fileTree(dir: file("$rootDir/${dep.directory}/$PLATFORMS_ANDROID"), include: ["**/*.aar"])
412
396
  aarFiles.each { aarFile ->
@@ -427,7 +411,7 @@ task addDependenciesFromNativeScriptPlugins {
427
411
  }
428
412
  }
429
413
 
430
- task addDependenciesFromAppResourcesLibraries {
414
+ task 'addDependenciesFromAppResourcesLibraries' {
431
415
  def appResourcesPath = getAppResourcesPath()
432
416
  def appResourcesLibraries = file("$appResourcesPath/Android/libs")
433
417
  if (appResourcesLibraries.exists()) {
@@ -451,47 +435,20 @@ task addDependenciesFromAppResourcesLibraries {
451
435
  }
452
436
 
453
437
  if (failOnCompilationWarningsEnabled()) {
454
- tasks.withType(JavaCompile) {
438
+ tasks.withType(JavaCompile).configureEach {
455
439
  options.compilerArgs << '-Xlint:all' << "-Werror"
456
440
  options.deprecation = true
457
441
  }
458
442
  }
459
443
 
460
- tasks.whenTaskAdded({ DefaultTask currentTask ->
461
- if (currentTask =~ /generate.+BuildConfig/) {
462
- currentTask.finalizedBy(extractAllJars)
463
- extractAllJars.finalizedBy(collectAllJars)
464
- }
465
- if (currentTask =~ /compile.+JavaWithJavac/) {
466
- currentTask.dependsOn(runSbg)
467
- currentTask.finalizedBy(buildMetadata)
468
- }
469
-
470
-
471
- if (currentTask =~ /compile.+Kotlin.+/) {
472
- currentTask.dependsOn(runSbg)
473
- currentTask.finalizedBy(buildMetadata)
474
- }
475
-
476
- if (currentTask =~ /merge.*Assets/) {
477
- currentTask.dependsOn(buildMetadata)
478
- }
479
- // ensure buildMetadata is done before R8 to allow custom proguard from metadata
480
- if (currentTask =~ /minify.*WithR8/) {
481
- currentTask.dependsOn(buildMetadata)
482
- }
483
- if (currentTask =~ /assemble.*Debug/ || currentTask =~ /assemble.*Release/) {
484
- currentTask.finalizedBy("validateAppIdMatch")
485
- }
486
- })
487
444
 
488
445
  ////////////////////////////////////////////////////////////////////////////////////
489
- ///////////////////////////// EXECUTUION PHASE /////////////////////////////////////
446
+ ///////////////////////////// EXECUTION PHASE /////////////////////////////////////
490
447
  ////////////////////////////////////////////////////////////////////////////////////
491
448
 
492
449
  task runSbg(type: BuildToolTask) {
493
450
  dependsOn "collectAllJars"
494
- def rootPath = "";
451
+ def rootPath = ""
495
452
  if (!findProject(':static-binding-generator').is(null)) {
496
453
  rootPath = Paths.get(project(':static-binding-generator').projectDir.path, "build/libs").toString()
497
454
  dependsOn ':static-binding-generator:jar'
@@ -505,7 +462,7 @@ task runSbg(type: BuildToolTask) {
505
462
  mainClass = "-jar"
506
463
 
507
464
  def paramz = new ArrayList<String>()
508
- paramz.add(Paths.get(rootPath,"static-binding-generator.jar"))
465
+ paramz.add(Paths.get(rootPath, "static-binding-generator.jar"))
509
466
 
510
467
  if (failOnCompilationWarningsEnabled()) {
511
468
  paramz.add("-show-deprecation-warnings")
@@ -551,7 +508,7 @@ def explodeAar(File compileDependency, File outputDir) {
551
508
  }
552
509
  }
553
510
 
554
- def md5(String string) {
511
+ static def md5(String string) {
555
512
  MessageDigest digest = MessageDigest.getInstance("MD5")
556
513
  digest.update(string.bytes)
557
514
  return new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0')
@@ -584,9 +541,9 @@ allprojects {
584
541
  def buildType = project.selectedBuildType
585
542
  def jars = []
586
543
  def artifactType = Attribute.of('artifactType', String)
587
- android.applicationVariants.all { variant ->
544
+ android.applicationVariants.configureEach { variant ->
588
545
  if (variant.buildType.name == buildType) {
589
- variant.getCompileClasspath().each { fileDependency ->
546
+ variant.getCompileClasspath(null).each { fileDependency ->
590
547
  processJar(fileDependency, jars)
591
548
  }
592
549
  }
@@ -604,7 +561,7 @@ def processJar(File jar, jars) {
604
561
  logger.debug("Creating dynamic task ${taskName}")
605
562
 
606
563
  // Add discovered jars as dependencies of cleanupAllJars.
607
- // This is cruicial for cloud builds because they are different
564
+ // This is crucial for cloud builds because they are different
608
565
  // on each incremental build (as each time the gradle user home
609
566
  // directory is a randomly generated string)
610
567
  cleanupAllJars.inputs.files jar
@@ -634,7 +591,7 @@ def processJar(File jar, jars) {
634
591
  }
635
592
  }
636
593
 
637
- task cleanupAllJars {
594
+ task 'cleanupAllJars' {
638
595
  // We depend on the list of libs directories that might contain aar or jar files
639
596
  // and on the list of all discovered jars
640
597
  inputs.files(pluginDependencies)
@@ -659,7 +616,7 @@ task cleanupAllJars {
659
616
 
660
617
 
661
618
  // Placeholder task which depends on all dynamically generated extraction tasks
662
- task extractAllJars {
619
+ task 'extractAllJars' {
663
620
  dependsOn cleanupAllJars
664
621
  outputs.files extractAllJarsTimestamp
665
622
 
@@ -668,7 +625,7 @@ task extractAllJars {
668
625
  }
669
626
  }
670
627
 
671
- task collectAllJars {
628
+ task 'collectAllJars' {
672
629
  dependsOn extractAllJars
673
630
  description "gathers all paths to jar dependencies before building metadata with them"
674
631
 
@@ -711,22 +668,22 @@ task copyMetadataFilters(type: Copy) {
711
668
  into "$BUILD_TOOLS_PATH"
712
669
  }
713
670
 
714
- task copyMetadata {
671
+ task 'copyMetadata' {
715
672
  doLast {
716
673
  copy {
717
- from "$projectDir/src/main/assets/metadata"
718
- into getMergedAssetsOutputPath() + "/metadata"
674
+ from "$projectDir/src/main/assets/metadata"
675
+ into getMergedAssetsOutputPath() + "/metadata"
719
676
  }
720
677
  }
721
678
  }
722
679
 
723
680
  def listf(String directoryName, ArrayList<File> store) {
724
- def directory = new File(directoryName);
681
+ def directory = new File(directoryName)
725
682
 
726
- def resultList = new ArrayList<File>();
683
+ def resultList = new ArrayList<File>()
727
684
 
728
- def fList = directory.listFiles();
729
- resultList.addAll(Arrays.asList(fList));
685
+ def fList = directory.listFiles()
686
+ resultList.addAll(Arrays.asList(fList))
730
687
  for (File file : fList) {
731
688
  if (file.isFile()) {
732
689
  store.add(file)
@@ -738,7 +695,7 @@ def listf(String directoryName, ArrayList<File> store) {
738
695
  }
739
696
 
740
697
  task buildMetadata(type: BuildToolTask) {
741
- def rootPath = "";
698
+ def rootPath = ""
742
699
  if (!findProject(':android-metadata-generator').is(null)) {
743
700
  rootPath = Paths.get(project(':android-metadata-generator').projectDir.path, "build/libs").toString()
744
701
  dependsOn ':android-metadata-generator:jar'
@@ -761,11 +718,13 @@ task buildMetadata(type: BuildToolTask) {
761
718
  // make MDG aware of whitelist.mdg and blacklist.mdg files
762
719
  inputs.files(project.fileTree(dir: "$rootDir", include: "**/*.mdg"))
763
720
 
764
- def classesDir = "$buildDir/intermediates/javac"
765
- inputs.dir(classesDir)
721
+ def classesDir = layout.buildDirectory.dir("intermediates/javac").get().asFile
722
+ if (classesDir.exists()) {
723
+ inputs.dir(classesDir)
724
+ }
766
725
 
767
- def kotlinClassesDir = "$buildDir/tmp/kotlin-classes"
768
- if (file(kotlinClassesDir).exists()) {
726
+ def kotlinClassesDir = layout.buildDirectory.dir("tmp/kotlin-classes").get().asFile
727
+ if (kotlinClassesDir.exists()) {
769
728
  inputs.dir(kotlinClassesDir)
770
729
  }
771
730
 
@@ -785,8 +744,8 @@ task buildMetadata(type: BuildToolTask) {
785
744
 
786
745
  rootProject.subprojects {
787
746
 
788
- def projectClassesDir = new File("$it.buildDir/intermediates/javac")
789
- def projectKotlinClassesDir = new File("$it.buildDir/tmp/kotlin-classes")
747
+ def projectClassesDir = it.layout.buildDirectory.dir("intermediates/javac").get().asFile
748
+ def projectKotlinClassesDir = it.layout.buildDirectory.dir("tmp/kotlin-classes").get().asFile
790
749
 
791
750
  if (projectClassesDir.exists()) {
792
751
  def projectClassesSubDirs = projectClassesDir.listFiles()
@@ -797,14 +756,14 @@ task buildMetadata(type: BuildToolTask) {
797
756
  }
798
757
  }
799
758
 
800
- if (projectKotlinClassesDir.exists()) {
801
- def projectKotlinClassesSubDirs = projectKotlinClassesDir.listFiles();
802
- for (File subDir : projectKotlinClassesSubDirs) {
803
- if (!kotlinClassesSubDirs.contains(subDir)) {
804
- kotlinClassesSubDirs.add(subDir)
805
- }
759
+ if (projectKotlinClassesDir.exists()) {
760
+ def projectKotlinClassesSubDirs = projectKotlinClassesDir.listFiles()
761
+ for (File subDir : projectKotlinClassesSubDirs) {
762
+ if (!kotlinClassesSubDirs.contains(subDir)) {
763
+ kotlinClassesSubDirs.add(subDir)
764
+ }
765
+ }
806
766
  }
807
- }
808
767
  }
809
768
 
810
769
  def generatedClasses = new LinkedList<String>()
@@ -821,7 +780,7 @@ task buildMetadata(type: BuildToolTask) {
821
780
  }
822
781
 
823
782
  def store = new ArrayList<File>()
824
- for (String dir: generatedClasses){
783
+ for (String dir : generatedClasses) {
825
784
  listf(dir, store)
826
785
  }
827
786
 
@@ -846,11 +805,11 @@ task buildMetadata(type: BuildToolTask) {
846
805
  def paramz = new ArrayList<String>()
847
806
  paramz.add(Paths.get(rootPath, "android-metadata-generator.jar"))
848
807
 
849
- if(enableAnalytics){
808
+ if (enableAnalytics) {
850
809
  paramz.add("analyticsFilePath=$analyticsFilePath")
851
810
  }
852
811
 
853
- if(enableVerboseMDG){
812
+ if (enableVerboseMDG) {
854
813
  paramz.add("verbose")
855
814
  }
856
815
 
@@ -912,7 +871,7 @@ static def shouldIncludeDirForTypings(path, includeDirs) {
912
871
  return false
913
872
  }
914
873
 
915
- task copyTypings {
874
+ task 'copyTypings' {
916
875
  doLast {
917
876
  outLogger.withStyle(Style.Info).println "Copied generated typings to application root level. Make sure to import android.d.ts in reference.d.ts"
918
877
 
@@ -926,12 +885,12 @@ task copyTypings {
926
885
  copyTypings.onlyIf { generateTypescriptDefinitions.didWork }
927
886
  generateTypescriptDefinitions.finalizedBy(copyTypings)
928
887
 
929
- task validateAppIdMatch {
888
+ task 'validateAppIdMatch' {
930
889
  doLast {
931
890
  def lineSeparator = System.getProperty("line.separator")
932
891
 
933
892
  if (project.hasProperty("nsApplicationIdentifier") && !project.hasProperty("release")) {
934
- if (project.nsApplicationIdentifier != android.defaultConfig.applicationId) {
893
+ if (project.nsApplicationIdentifier != android.defaultConfig.applicationId && android.namespace != appIdentifier) {
935
894
  def errorMessage = "${lineSeparator}WARNING: The Application identifier is different from the one inside \"package.json\" file.$lineSeparator" +
936
895
  "NativeScript CLI might not work properly.$lineSeparator" +
937
896
  "Remove applicationId from app.gradle and update the \"nativescript.id\" in package.json.$lineSeparator" +
@@ -970,3 +929,168 @@ task cleanMdg(type: Delete) {
970
929
 
971
930
  cleanSbg.dependsOn(cleanMdg)
972
931
  clean.dependsOn(cleanSbg)
932
+
933
+
934
+ tasks.configureEach({ DefaultTask currentTask ->
935
+ // println "\t ~ [DEBUG][app] build.gradle - currentTask = ${currentTask.name}..."
936
+ if (currentTask =~ /generate.+BuildConfig/) {
937
+ currentTask.finalizedBy(extractAllJars)
938
+ extractAllJars.finalizedBy(collectAllJars)
939
+ }
940
+ if (currentTask =~ /compile.+JavaWithJavac/) {
941
+ currentTask.dependsOn(runSbg)
942
+ currentTask.finalizedBy(buildMetadata)
943
+ }
944
+
945
+ if (currentTask =~ /compile.+Kotlin.+/) {
946
+ currentTask.dependsOn(runSbg)
947
+ currentTask.finalizedBy(buildMetadata)
948
+ }
949
+
950
+ if (currentTask =~ /merge.*Assets/) {
951
+ currentTask.dependsOn(buildMetadata)
952
+ }
953
+ // ensure buildMetadata is done before R8 to allow custom proguard from metadata
954
+ if (currentTask =~ /minify.*WithR8/) {
955
+ currentTask.dependsOn(buildMetadata)
956
+ }
957
+ if (currentTask =~ /assemble.*Debug/ || currentTask =~ /assemble.*Release/) {
958
+ currentTask.finalizedBy("validateAppIdMatch")
959
+ }
960
+
961
+ if (currentTask =~ /process.+Resources/) {
962
+ cleanupAllJars.dependsOn(currentTask)
963
+ }
964
+
965
+ if (currentTask =~ /merge.+Shaders/) {
966
+ currentTask.dependsOn(runSbg)
967
+ currentTask.finalizedBy(buildMetadata)
968
+ }
969
+
970
+ if (currentTask =~ /mergeDex.+/) {
971
+ currentTask.dependsOn(runSbg)
972
+ currentTask.finalizedBy(buildMetadata)
973
+ }
974
+
975
+ if (currentTask =~ /dexBuilder.+/) {
976
+ currentTask.finalizedBy(buildMetadata)
977
+ }
978
+
979
+ if (currentTask =~ /extract.+NativeSymbolTables/) {
980
+ currentTask.finalizedBy(buildMetadata)
981
+ }
982
+
983
+ if (currentTask =~ /mergeExtDex.+/) {
984
+ currentTask.finalizedBy(buildMetadata)
985
+ }
986
+
987
+ if (currentTask =~ /mergeLibDex.+/) {
988
+ currentTask.finalizedBy(buildMetadata)
989
+ }
990
+
991
+ if (currentTask =~ /mergeProjectDex.+/) {
992
+ currentTask.finalizedBy(buildMetadata)
993
+ }
994
+
995
+ if (currentTask =~ /merge.+NativeLibs/) {
996
+ currentTask.finalizedBy(buildMetadata)
997
+ }
998
+
999
+ if (currentTask =~ /sync.+LibJars/) {
1000
+ currentTask.finalizedBy(buildMetadata)
1001
+ }
1002
+
1003
+ if (currentTask.name == "extractProguardFiles") {
1004
+ currentTask.finalizedBy(buildMetadata)
1005
+ }
1006
+
1007
+ if (currentTask =~ /generate.+LintVitalReportModel/) {
1008
+ buildMetadata.finalizedBy(currentTask)
1009
+ }
1010
+
1011
+ if (currentTask =~ /lintVitalAnalyze.+/) {
1012
+ buildMetadata.finalizedBy(currentTask)
1013
+ }
1014
+
1015
+ if (currentTask =~ /extract.+NativeSymbolTables/) {
1016
+ buildMetadata.finalizedBy(currentTask)
1017
+ }
1018
+
1019
+ if (currentTask =~ /merge.+GlobalSynthetics/) {
1020
+ buildMetadata.finalizedBy(currentTask)
1021
+ }
1022
+
1023
+ if (currentTask =~ /optimize.+Resources/) {
1024
+ currentTask.finalizedBy(buildMetadata)
1025
+ }
1026
+
1027
+ if (currentTask =~ /buildCMake.*/) {
1028
+ currentTask.finalizedBy(buildMetadata)
1029
+ }
1030
+
1031
+ if (currentTask =~ /configureCMake.*/) {
1032
+ currentTask.finalizedBy(buildMetadata)
1033
+ }
1034
+
1035
+ if (currentTask =~ /validateSigning.*/) {
1036
+ currentTask.finalizedBy(buildMetadata)
1037
+ }
1038
+
1039
+ if (currentTask =~ /generate.*LintReportModel/) {
1040
+ buildMetadata.finalizedBy(currentTask)
1041
+ }
1042
+
1043
+ if (currentTask.name.contains(":runtime:configureCMakeRelWithDebInfo")) {
1044
+ currentTask.finalizedBy(buildMetadata)
1045
+ }
1046
+
1047
+ if (currentTask =~ /generate.*AndroidTestResValues/) {
1048
+ buildMetadata.finalizedBy(currentTask)
1049
+ }
1050
+
1051
+ if (currentTask =~ /generate.*AndroidTestLintModel/) {
1052
+ buildMetadata.finalizedBy(currentTask)
1053
+ }
1054
+
1055
+ if (currentTask =~ /generate.*UnitTestLintModel/) {
1056
+ currentTask.finalizedBy(buildMetadata)
1057
+ }
1058
+
1059
+ if (currentTask =~ /generate.*UnitTestLintModel/) {
1060
+ currentTask.finalizedBy(buildMetadata)
1061
+ }
1062
+
1063
+
1064
+ if (currentTask =~ /lintAnalyze.*UnitTest/) {
1065
+ currentTask.finalizedBy(buildMetadata)
1066
+ }
1067
+
1068
+ if (currentTask =~ /process.*JavaRes/) {
1069
+ currentTask.finalizedBy(buildMetadata)
1070
+ }
1071
+
1072
+ if (currentTask =~ /strip.*DebugSymbols/) {
1073
+ currentTask.finalizedBy(buildMetadata)
1074
+ }
1075
+
1076
+ if (currentTask =~ /merge.*JavaResource/) {
1077
+ currentTask.finalizedBy(buildMetadata)
1078
+ }
1079
+
1080
+ if (currentTask.name == ":runtime:lintAnalyzeDebugAndroidTest" || currentTask.name == ":runtime:lintAnalyzeReleaseAndroidTest") {
1081
+ currentTask.finalizedBy(buildMetadata)
1082
+ }
1083
+
1084
+ if (currentTask.name == "lintAnalyzeDebug" || currentTask.name == "lintAnalyzeRelease") {
1085
+ buildMetadata.finalizedBy(currentTask)
1086
+ }
1087
+
1088
+ if (currentTask =~ /bundle.*Resources/) {
1089
+ currentTask.finalizedBy(buildMetadata)
1090
+ }
1091
+
1092
+ if (currentTask =~ /compile.*ArtProfile/) {
1093
+ currentTask.finalizedBy(buildMetadata)
1094
+ }
1095
+
1096
+ })