Skip to content

Commit f11afde

Browse files
committed
fixed up gradle build to create and copy the right metadata
1 parent 0a11861 commit f11afde

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: build/project-template-gradle/build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ android {
6969
signingConfig signingConfigs.release
7070
}
7171
}
72+
73+
applicationVariants.all { variant ->
74+
def tsk = variant.mergeAssets
75+
tsk.dependsOn(copyMetadata)
76+
}
7277
}
7378

7479
repositories {
@@ -146,10 +151,8 @@ task copyMetadata(type: Copy) {
146151
!buildMetadata.didWork
147152
}
148153

149-
doLast {
150-
from "metadata/output"
151-
into "src/main/assets/metadata"
152-
}
154+
from "metadata/output"
155+
into "src/main/assets/metadata"
153156
}
154157

155158
task cleanLocalAarFiles(type: Delete) {
@@ -175,9 +178,6 @@ ensureMetadataOutDir.dependsOn(collectAllJars)
175178
buildMetadata.dependsOn(ensureMetadataOutDir)
176179
copyMetadata.dependsOn(buildMetadata)
177180

178-
assembleRelease.dependsOn(copyMetadata)
179-
assembleDebug.dependsOn(copyMetadata)
180-
181181
task buildapk {
182182
if(project.hasProperty("release")) {
183183
dependsOn assembleRelease

0 commit comments

Comments
 (0)