代码拉取完成,页面将自动刷新
apply {
plugin "com.android.application"
plugin "kotlin-android"
plugin "kotlin-android-extensions"
if (Config.depConfig.plugin_api.isApply) {
plugin Config.depConfig.plugin_api.pluginId
}
if (Config.depConfig.plugin_bus.isApply) {
plugin Config.depConfig.plugin_bus.pluginId
}
}
configSigning()
configApkName()
if (Config.depConfig.plugin_bus.isApply) {
bus {
onlyScanLibRegex = '^([:]|(com\\.blankj)).+$'
}
}
if (Config.depConfig.plugin_api.isApply) {
api {
onlyScanLibRegex = '^([:]|(com\\.blankj)).+$'
}
}
android {
compileSdkVersion Config.compileSdkVersion
defaultConfig {
minSdkVersion Config.minSdkVersion
versionCode Config.versionCode
versionName Config.versionName
applicationId Config.applicationId + suffix
targetSdkVersion Config.targetSdkVersion
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationIdSuffix ".debug"
resValue "string", "app_name", Config.appName + suffix + ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "app_name", Config.appName + suffix
}
}
packagingOptions {
exclude 'META-INF/*'
}
dexOptions {
preDexLibraries true
javaMaxHeapSize "8g"
maxProcessCount 8
dexInProcess = true
}
}
dependencies {
// LeakCanary
debugImplementation Config.depConfig.leakcanary_android.dep
debugImplementation Config.depConfig.lib_utildebug.dep
releaseImplementation Config.depConfig.lib_utildebug_no_op.dep
// 根据 Config.pkgConfig 来依赖所有 pkg
for (def entrySet : ConfigUtils.getApplyPkgs().entrySet()) {
api entrySet.value.dep
}
if (Config.depConfig.feature_mock.isApply) {
api Config.depConfig.feature_mock.dep
}
}
def getSuffix() {
if (project.name == "feature_launcher_app") return ""
return "." + project.name.substring("feature_".length(), project.name.length() - "_app".length())
}
def configSigning() {
File signPropertiesFile = file("${rootDir.path}/sign/keystore.properties")
if (!signPropertiesFile.exists()) return
GLog.d("${project.toString()} sign start...")
project.android {
Properties properties = new Properties()
properties.load(new FileInputStream(signPropertiesFile))
signingConfigs {
release {
storeFile new File(signPropertiesFile.getParent(), properties['keystore'])
storePassword properties['storePassword']
keyAlias properties['keyAlias']
keyPassword properties['keyPassword']
}
}
buildTypes.release.signingConfig signingConfigs.release
}
GLog.d("${project.toString()} sign end...")
}
def configApkName() {
project.android.applicationVariants.all { variant ->
if (variant.buildType.name != "debug") {
def artifact = variant.getPackageApplicationProvider().get()
artifact.outputDirectory = new File("${rootDir.path}/apk")
artifact.outputScope.apkDatas.forEach { apkData ->
apkData.outputFileName = "util" + suffix +
(variant.flavorName == "" ? "" : ("_" + variant.flavorName)) +
"_" + variant.versionName.replace(".", "_") +
"_" + variant.buildType.name +
".apk"
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。