32 lines
959 B
Groovy
32 lines
959 B
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
|
|
|
defaultConfig {
|
|
applicationId "com.mogo.skin.deqing"
|
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
|
|
|
// 这里每次更新皮肤资源都要对版本++ 用于版本管理
|
|
versionCode 1
|
|
versionName "1.0"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
}
|
|
|
|
android.applicationVariants.all { variant ->
|
|
def buildTime = new Date().format("yyyy_MM_dd", TimeZone.getTimeZone("GMT+08:00"))
|
|
def projectFolderName = project.name // 获取项目文件夹名称
|
|
|
|
variant.outputs.all { output ->
|
|
outputFileName = [
|
|
projectFolderName,
|
|
"v${variant.versionCode}",
|
|
buildTime
|
|
].findAll { it.length() > 0 }.join('_') << ".apk"
|
|
}
|
|
} |