生成库文件
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
libraryVariants.all { variant ->
variant.outputs.all {
outputFileName = "communication-${defaultConfig.versionName}-${variant.name}.aar"
}
}
}
生成apk
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "version_app_name", "${defaultConfig.versionName}"
}
debug {
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "SAMPLE_APP_v${defaultConfig.versionName}.apk"
}
}
resValue "string", "version_app_name", "${defaultConfig.versionName}"
}
}