52 lines
1.5 KiB
Groovy
52 lines
1.5 KiB
Groovy
apply plugin: 'com.android.application'
|
||
apply from: '../.winboll/winboll_app_build.gradle'
|
||
apply from: '../.winboll/winboll_lint_build.gradle'
|
||
|
||
def genVersionName(def versionName){
|
||
// 检查编译标志位配置
|
||
assert (winbollBuildProps['stageCount'] != null)
|
||
assert (winbollBuildProps['baseVersion'] != null)
|
||
// 保存基础版本号
|
||
winbollBuildProps.setProperty("baseVersion", "${versionName}");
|
||
//保存编译标志配置
|
||
FileOutputStream fos = new FileOutputStream(winbollBuildPropsFile)
|
||
winbollBuildProps.store(fos, "${winbollBuildPropsDesc}");
|
||
fos.close();
|
||
|
||
// 返回编译版本号
|
||
return "${versionName}." + winbollBuildProps['stageCount']
|
||
}
|
||
|
||
android {
|
||
// 适配MIUI12
|
||
compileSdkVersion 30
|
||
buildToolsVersion "30.0.3"
|
||
|
||
defaultConfig {
|
||
applicationId "cc.winboll.studio.aes"
|
||
minSdkVersion 26
|
||
targetSdkVersion 30
|
||
//1. Android 官方规则
|
||
//- versionCode 类型:int 整型
|
||
//- Java int 最大值:2147483647
|
||
versionCode 1520000
|
||
// versionName 更新后需要手动设置
|
||
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||
versionName "15.20"
|
||
if(true) {
|
||
versionName = genVersionName("${versionName}")
|
||
}
|
||
}
|
||
|
||
// 米盟 SDK
|
||
packagingOptions {
|
||
doNotStrip "*/*/libmimo_1011.so"
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
api project(':libaes')
|
||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||
}
|