代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/AndroidUtilCode 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
apply plugin: "com.android.application"
apply {
from "${rootDir.path}/buildCommon.gradle"
from "${rootDir.path}/config/flavor.gradle"
if (Config.plugins.plugin_api.isApply) {
plugin Config.plugins.plugin_api.id
}
if (Config.plugins.plugin_bus.isApply) {
plugin Config.plugins.plugin_bus.id
}
}
configSigning()
configApkName()
//if (PluginConfig.plugin_bus.isApply) {
// bus {
// onlyScanLibRegex = '^([:]|(com\\.blankj)).+$'
// }
//}
//
//if (PluginConfig.plugin_api.isApply) {
// api {
// onlyScanLibRegex = '^([:]|(com\\.blankj)).+$'
// }
//}
android {
defaultConfig {
applicationId Config.applicationId + suffix
targetSdkVersion Config.targetSdkVersion
multiDexEnabled true
}
buildTypes {
debug {}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/*'
}
dexOptions {
preDexLibraries true
javaMaxHeapSize "8g"
maxProcessCount 8
dexInProcess = true
}
productFlavors {
dev {
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
resValue "string", "app_name", Config.appName + suffix + "-dev"
}
production {
resValue "string", "app_name", Config.appName + suffix
}
}
}
dependencies {
// LeakCanary
debugImplementation Config.libs.leakcanary.path
debugImplementation Config.modules.lib_utildebug.dep
releaseImplementation Config.modules.lib_utildebug_no_op.dep
// 根据 Config.pkgConfig 来依赖所有 pkg
for (def entrySet : ConfigUtils.getApplyPkgs().entrySet()) {
api entrySet.value.dep
}
if (Config.modules.feature_mock.isApply) {
api ModuleConfig.modules.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")
variant.outputs.each {
it.outputFileName = "util" + suffix +
(variant.flavorName == "" ? "" : ("_" + variant.flavorName)) +
"_" +
variant.versionName.replace(".", "_") +
"_" +
variant.buildType.name +
".apk"
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。