refactor: 升级编译配置并调整最低API版本
- 升级 Gradle 编译版本为 Java 11 根目录 build.gradle 中 JavaCompile 配置从 VERSION_1_7 改为 VERSION_11 - 调整 minSdkVersion 从 21 升级至 26 适配 Android 8.0 (API 26) 及以上系统 修改范围: aes/build.gradle, libaes/build.gradle - 移除未使用的 XXPermissions 依赖 该库使用 Java 8 字节码与 minSdkVersion 21 不兼容,项目中未引用此库
This commit is contained in:
@@ -24,7 +24,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.aes"
|
applicationId "cc.winboll.studio.aes"
|
||||||
minSdkVersion 21
|
minSdkVersion 26
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ allprojects {
|
|||||||
// 1. 对纯 Java 模块的 JavaCompile 任务配置(升级为 Java 11)
|
// 1. 对纯 Java 模块的 JavaCompile 任务配置(升级为 Java 11)
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.compilerArgs << "-parameters"
|
options.compilerArgs << "-parameters"
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
targetCompatibility = JavaVersion.VERSION_1_7
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
// 可选:确保编码一致
|
// 可选:确保编码一致
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ android {
|
|||||||
buildToolsVersion "30.0.3"
|
buildToolsVersion "30.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 26
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,8 +27,6 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// 权限请求框架:https://github.com/getActivity/XXPermissions
|
|
||||||
api 'com.github.getActivity:XXPermissions:18.63'
|
|
||||||
// 下拉控件
|
// 下拉控件
|
||||||
api 'com.baoyz.pullrefreshlayout:library:1.2.0'
|
api 'com.baoyz.pullrefreshlayout:library:1.2.0'
|
||||||
// 拼音搜索
|
// 拼音搜索
|
||||||
|
|||||||
Reference in New Issue
Block a user