build: update agp android gradle version
update agp to 8.13.2,update gradle to 8.13,add build.gradle namespace
This commit is contained in:
@@ -9,8 +9,10 @@ def releaseTime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "com.ttstd.elderlyassistant"
|
||||||
|
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
// buildToolsVersion "30.0.3"
|
buildToolsVersion "36.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.ttstd.elderlyassistant"
|
applicationId "com.ttstd.elderlyassistant"
|
||||||
@@ -22,6 +24,12 @@ android {
|
|||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
ndk {
|
||||||
|
//根据需要 自行选择添加的对应cpu类型的.so库。
|
||||||
|
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||||
|
// 还可以添加 'armeabi','armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64'
|
||||||
|
}
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
// Or, if you prefer, you can continue to check for errors in release builds,
|
// Or, if you prefer, you can continue to check for errors in release builds,
|
||||||
@@ -29,10 +37,6 @@ android {
|
|||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
|
||||||
ndk {
|
|
||||||
//根据需要 自行选择添加的对应cpu类型的.so库。
|
|
||||||
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
||||||
// 还可以添加 'armeabi','armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
@@ -40,9 +44,10 @@ android {
|
|||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
dataBinding {
|
buildFeatures {
|
||||||
enabled true
|
dataBinding true
|
||||||
}
|
buildConfig true
|
||||||
|
aidl true
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@@ -59,36 +64,25 @@ android {
|
|||||||
versionNameSuffix "_debug"
|
versionNameSuffix "_debug"
|
||||||
debuggable true
|
debuggable true
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
//Zipalign优化
|
|
||||||
zipAlignEnabled true
|
|
||||||
signingConfig signingConfigs.keypub
|
signingConfig signingConfigs.keypub
|
||||||
applicationVariants.all { variant ->
|
|
||||||
variant.outputs.each { output ->
|
|
||||||
if (outputFile != null) {
|
|
||||||
def fileName = "${appName()}_V${defaultConfig.versionName}_${releaseTime()}.apk"
|
|
||||||
output.outputFileName = fileName
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
//Zipalign优化
|
|
||||||
zipAlignEnabled true
|
|
||||||
//前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件
|
//前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
//签名
|
|
||||||
signingConfig signingConfigs.keypub
|
signingConfig signingConfigs.keypub
|
||||||
// 将release版本的包名重命名,加上版本及日期
|
}
|
||||||
|
}
|
||||||
|
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
def outputFile = ""
|
def buildType = variant.buildType.name
|
||||||
if (outputFile != null) {
|
|
||||||
def fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType.name}.apk"
|
if (buildType.contains("debug")) {
|
||||||
output.outputFileName = new File(outputFile, fileName)
|
output.outputFileName = "${appName()}_V${defaultConfig.versionName}_${releaseTime()}.apk"
|
||||||
}
|
} else {
|
||||||
}
|
output.outputFileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType}.apk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -134,7 +128,7 @@ dependencies {
|
|||||||
implementation 'com.jeremyliao:live-event-bus-x:1.7.3'
|
implementation 'com.jeremyliao:live-event-bus-x:1.7.3'
|
||||||
|
|
||||||
//MMKV
|
//MMKV
|
||||||
implementation 'com.tencent:mmkv-static:1.2.14'
|
implementation 'com.tencent:mmkv-static:2.4.0'
|
||||||
//bugly
|
//bugly
|
||||||
implementation 'com.tencent.bugly:crashreport:4.1.9.2'
|
implementation 'com.tencent.bugly:crashreport:4.1.9.2'
|
||||||
implementation 'com.iqiyi.xcrash:xcrash-android-lib:3.0.0'
|
implementation 'com.iqiyi.xcrash:xcrash-android-lib:3.0.0'
|
||||||
|
|||||||
23
build.gradle
23
build.gradle
@@ -15,8 +15,7 @@ buildscript {
|
|||||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.6.4'
|
classpath 'com.android.tools.build:gradle:8.13.2'
|
||||||
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
@@ -27,7 +26,27 @@ allprojects {
|
|||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy {
|
resolutionStrategy {
|
||||||
force 'androidx.constraintlayout:constraintlayout:2.0.4'
|
force 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||||
|
force 'androidx.core:core:1.5.0'
|
||||||
|
|
||||||
|
//for targetSdkVersion 29
|
||||||
|
force 'androidx.activity:activity:1.2.2'
|
||||||
force 'androidx.appcompat:appcompat:1.3.1'
|
force 'androidx.appcompat:appcompat:1.3.1'
|
||||||
|
force 'androidx.lifecycle:lifecycle-livedata:2.3.1'
|
||||||
|
force 'androidx.lifecycle:lifecycle-livedata-core:2.3.1'
|
||||||
|
force 'androidx.lifecycle:lifecycle-runtime:2.3.1'
|
||||||
|
force 'androidx.lifecycle:lifecycle-viewmodel:2.3.1'
|
||||||
|
force 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1'
|
||||||
|
force 'androidx.lifecycle:lifecycle-service:2.3.1'
|
||||||
|
force 'androidx.lifecycle:lifecycle-process:2.3.1'
|
||||||
|
force 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
||||||
|
force 'androidx.savedstate:savedstate:1.1.0'
|
||||||
|
force 'androidx.profileinstaller:profileinstaller:1.1.0'
|
||||||
|
force 'androidx.startup:startup-runtime:1.0.0'
|
||||||
|
force 'androidx.arch.core:core-runtime:2.1.0'
|
||||||
|
force 'androidx.sqlite:sqlite:2.1.0'
|
||||||
|
force 'androidx.sqlite:sqlite-framework:2.1.0'
|
||||||
|
force 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user