Skip to content

Commit fc8fdbc

Browse files
author
limiaolong
committed
打包aar增强
1 parent f407df4 commit fc8fdbc

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

lib/utilcode/build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,26 @@ dependencies {
4040
testImplementation Config.depConfig.eventbus_lib.dep
4141
}
4242

43+
android {
44+
buildTypes {
45+
release {
46+
minifyEnabled false
47+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
48+
android.libraryVariants.all { variant ->
49+
if(variant.name.equalsIgnoreCase("release")) {
50+
variant.outputs.all { output ->
51+
def f = output.outputFileName
52+
if (f != null && f.endsWith('.aar')) {
53+
def fileName = "auc-lib-util-v${defaultConfig.versionName}.aar"
54+
output.outputFileName = fileName
55+
}
56+
}
57+
}
58+
}
59+
}
60+
}
61+
}
62+
4363
afterEvaluate {
4464
verifyReleaseResources.enabled(false)
4565
}

0 commit comments

Comments
 (0)