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
551
574
project.ext.allJars = []
552
575
afterEvaluate { project ->
@@ -695,11 +718,28 @@ task collectAllJars {
695
718
}
696
719
}
697
720
721
+
task copyMetadata {
722
+
doLast {
723
+
copy {
724
+
from "$projectDir/src/main/assets/metadata"
725
+
into getMergedAssetsOutputPath() +"/metadata"
726
+
}
727
+
}
728
+
}
729
+
698
730
task buildMetadata(type: JavaExec) {
699
731
if (!findProject(':android-metadata-generator').is(null)) {
700
732
dependsOn ':android-metadata-generator:jar'
701
733
}
702
734
735
+
// 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
736
+
// 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
737
+
// the metadata files in the merge assets folder and they will be added to the result apk
738
+
739
+
// 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
740
+
//buildMetadata.finalizedBy(copyMetadata)
741
+
finalizedBy copyMetadata
742
+
703
743
description "builds metadata with provided jar dependencies"
0 commit comments