File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1+ import com.android.build.api.variant.FilterConfiguration
2+ import org.gradle.kotlin.dsl.androidComponents
13import java.net.URL
24import java.nio.file.Files
35import java.nio.file.StandardCopyOption
@@ -8,6 +10,21 @@ plugins {
810 id(" com.android.application" )
911}
1012
13+ androidComponents {
14+ onVariants(selector().withBuildType(" release" )) { variant ->
15+ variant.outputs.forEach { output ->
16+ // TODO: https://github.com/android/gradle-recipes/blob/cbe7c7dea2a3f5b1764756f24bf453d1235c80e2/listenToArtifacts/README.md
17+ with (output as com.android.build.api.variant.impl.VariantOutputImpl ) {
18+ val abiName = output.filters
19+ .find { it.filterType == FilterConfiguration .FilterType .ABI }
20+ ?.identifier ? : " universal"
21+ val newApkName = " cmfa-${versionName.get()} -meta-${abiName} -${variant.buildType} .apk"
22+ outputFileName = newApkName
23+ }
24+ }
25+ }
26+ }
27+
1128dependencies {
1229 compileOnly(project(" :hideapi" ))
1330
Original file line number Diff line number Diff line change @@ -77,8 +77,6 @@ subprojects {
7777
7878 if (! isApp) {
7979 consumerProguardFiles(" consumer-rules.pro" )
80- } else {
81- setProperty(" archivesBaseName" , " cmfa-$versionName " )
8280 }
8381 }
8482
You can’t perform that action at this time.
0 commit comments