Files
libappbase/appbase/build.gradle
T
BigPickle f42c887dfd fix(project): 启用AndroidX修复libaes依赖导致的运行时闪退
libaes:15.20.21 AAR内部编译了androidx.*类引用,
android.enableJetifier=false导致运行时ClassNotFoundException闪退,
且无异常日志(DEX层错误,UncaughtExceptionHandler无法捕获)
- gradle.properties: 启用android.useAndroidX和android.enableJetifier
- appbase/build.gradle: appcompat依赖迁移至androidx.appcompat:appcompat:1.3.1
2026-07-21 17:08:44 +08:00

59 lines
1.8 KiB
Groovy
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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.appbase"
minSdkVersion 26
targetSdkVersion 30
//1. Android 官方规则
//-  versionCode  类型:int 整型
//- Java int 最大值:2147483647
versionCode 1520000
// versionName 更新后需要手动设置
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
versionName "15.21"
if(true) {
versionName = genVersionName("${versionName}")
}
}
// 确保 Java 7 兼容性(已适配项目技术栈)
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
api project(':libappbase')
// WinBoLL库 nexus.winboll.cc 地址
//api 'cc.winboll.studio:libappbase:15.20.+'
api 'cc.winboll.studio:libaes:15.20.21'
api 'androidx.appcompat:appcompat:1.3.1'
api fileTree(dir: 'libs', include: ['*.jar'])
}