@@ -718,6 +718,7 @@ task buildMetadata(type: BuildToolTask) {
718
718
}
719
719
720
720
dependsOn copyMetadataFilters
721
+ dependsOn collectAllJars
721
722
722
723
// 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
723
724
// in that case the metadata won't be included in the result apk and it will crash, so to avoid this we are adding the copyMetadata task which will manually copy
@@ -735,7 +736,9 @@ task buildMetadata(type: BuildToolTask) {
735
736
inputs. files(project. fileTree(dir : " $rootDir " , include : " **/*.mdg" ))
736
737
737
738
def classesDir = " $buildDir /intermediates/javac"
738
- inputs. dir(classesDir)
739
+ if (file(classesDir). exists()) {
740
+ inputs. dir(classesDir)
741
+ }
739
742
740
743
def kotlinClassesDir = " $buildDir /tmp/kotlin-classes"
741
744
if (file(kotlinClassesDir). exists()) {
@@ -828,9 +831,6 @@ task buildMetadata(type: BuildToolTask) {
828
831
}
829
832
830
833
args paramz. toArray()
831
-
832
- logger. info(" Task buildMetadata: Call android-metadata-generator.jar with arguments: " + paramz. toString(). replaceAll(' ,' , ' ' ))
833
- outLogger. withStyle(Style.SuccessHeader ). println " Task buildMetadata: Call android-metadata-generator.jar with arguments: " + paramz. toString(). replaceAll(' ,' , ' ' )
834
834
}
835
835
}
836
836
@@ -976,7 +976,8 @@ project.tasks.configureEach {
976
976
}
977
977
978
978
// added because of a error with gradle 8 telling us to add this
979
- // could we do it another way?
979
+ // because buildMetadata uses the output of those
980
+ // TODO: there must be a way to make it simpler
980
981
if (! (name =~ / AndroidTest/ ) &&
981
982
(name =~ / merge(Debug|Release)Shaders/ ||
982
983
name =~ / desugar(Debug|Release)FileDependencies/ ||
@@ -993,7 +994,20 @@ project.tasks.configureEach {
993
994
name =~ / bundle(Debug|Release)Resources/ ||
994
995
name =~ / extract(Debug|Release)NativeSymbolTables/ ||
995
996
name =~ / extractProguardFiles/ ||
996
- name =~ / validateSigning(Debug|Release)/
997
+ name =~ / desugarBenchmarkFileDependencies/ ||
998
+ name =~ / mergeExtDexBenchmark/ ||
999
+ name =~ / mergeDexBenchmark/ ||
1000
+ name =~ / mergeBenchmarkShaders/ ||
1001
+ name =~ / mergeBenchmarkJavaResource/ ||
1002
+ name =~ / mergeBenchmarkJniLibFolders/ ||
1003
+ name =~ / checkBenchmarkDuplicateClasses/ ||
1004
+ name =~ / bundleBenchmarkResources/ ||
1005
+ name =~ / extractBenchmarkNativeSymbolTables/ ||
1006
+ // name =~ /compressBenchmarkAssets/ ||
1007
+ name =~ / mergeBenchmarkNativeLibs/ ||
1008
+ name =~ / stripBenchmark(Debug|Release)Symbols/ ||
1009
+ name =~ / buildKotlinToolingMetadata/ ||
1010
+ name =~ / validateSigning/
997
1011
)) {
998
1012
it. finalizedBy(buildMetadata)
999
1013
}
0 commit comments