You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Discover all jars and dynamically create tasks for the extraction of each of them
558
581
project.ext.allJars = []
559
582
afterEvaluate { project ->
@@ -702,11 +725,28 @@ task collectAllJars {
702
725
}
703
726
}
704
727
728
+
task copyMetadata {
729
+
doLast {
730
+
copy {
731
+
from "$projectDir/src/main/assets/metadata"
732
+
into getMergedAssetsOutputPath() +"/metadata"
733
+
}
734
+
}
735
+
}
736
+
705
737
task buildMetadata(type: BuildToolTask) {
706
738
if (!findProject(':android-metadata-generator').is(null)) {
707
739
dependsOn ':android-metadata-generator:jar'
708
740
}
709
741
742
+
// 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
743
+
// 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
744
+
// the metadata files in the merge assets folder and they will be added to the result apk
745
+
746
+
// The next line is added to avoid adding another copyData implementation from the firebase plugin - https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/3943bb9147f43c41599e801d026378eba93d3f3a/publish/scripts/installer.js#L1105
747
+
//buildMetadata.finalizedBy(copyMetadata)
748
+
finalizedBy copyMetadata
749
+
710
750
description "builds metadata with provided jar dependencies"
0 commit comments