style: 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:
129
app/build.gradle
129
app/build.gradle
@@ -9,7 +9,9 @@ static def releaseTime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 29
|
namespace "com.ttstd.dialer"
|
||||||
|
|
||||||
|
compileSdkVersion 33
|
||||||
// buildToolsVersion "36.0.0"
|
// buildToolsVersion "36.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
@@ -17,7 +19,7 @@ android {
|
|||||||
|
|
||||||
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
||||||
minSdkVersion 22
|
minSdkVersion 22
|
||||||
targetSdkVersion 29
|
targetSdkVersion 33
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
||||||
@@ -27,11 +29,6 @@ android {
|
|||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
//根据需要 自行选择添加的对应cpu类型的.so库。
|
//根据需要 自行选择添加的对应cpu类型的.so库。
|
||||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||||
@@ -51,22 +48,12 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dataBinding {
|
|
||||||
enabled true
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
jniLibs.srcDir(['libs'])
|
jniLibs.srcDir(['libs'])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
flatDir {
|
|
||||||
dirs 'libs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
JPUSH_PKGNAME : applicationId,
|
JPUSH_PKGNAME : applicationId,
|
||||||
JPUSH_APPKEY : "d779178d9900d4fb5d633678", //JPush 上注册的包名对应的 Appkey.
|
JPUSH_APPKEY : "d779178d9900d4fb5d633678", //JPush 上注册的包名对应的 Appkey.
|
||||||
@@ -85,6 +72,16 @@ android {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
dataBinding true
|
||||||
|
buildConfig true
|
||||||
|
}
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
path file('CMakeLists.txt')
|
path file('CMakeLists.txt')
|
||||||
@@ -144,14 +141,6 @@ android {
|
|||||||
//Zipalign优化
|
//Zipalign优化
|
||||||
zipAlignEnabled true
|
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 {
|
||||||
@@ -159,22 +148,27 @@ android {
|
|||||||
//Zipalign优化
|
//Zipalign优化
|
||||||
zipAlignEnabled true
|
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 ->
|
|
||||||
variant.outputs.each { output ->
|
|
||||||
def outputFile = ""
|
|
||||||
if (outputFile != null) {
|
|
||||||
def fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType.name}.apk"
|
|
||||||
output.outputFileName = new File(outputFile, fileName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add application variant configuration here instead
|
||||||
|
applicationVariants.all { variant ->
|
||||||
|
variant.outputs.each { output ->
|
||||||
|
def buildType = variant.buildType.name
|
||||||
|
def fileName = ""
|
||||||
|
|
||||||
|
if (buildType.contains("debug")) {
|
||||||
|
fileName = "${appName()}_V${defaultConfig.versionName}_${releaseTime()}.apk"
|
||||||
|
} else {
|
||||||
|
fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType}.apk"
|
||||||
|
}
|
||||||
|
|
||||||
|
output.outputFileName = fileName
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
@@ -287,7 +281,7 @@ dependencies {
|
|||||||
// 接入魅族厂商
|
// 接入魅族厂商
|
||||||
implementation "cn.jiguang.sdk.plugin:meizu:$jpush.version"
|
implementation "cn.jiguang.sdk.plugin:meizu:$jpush.version"
|
||||||
// JPush Android SDK v5.2.3 开始,需要单独引入 魅族 厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/meizu/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
// JPush Android SDK v5.2.3 开始,需要单独引入 魅族 厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/meizu/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
||||||
implementation(name: 'push-internal-5.0.5', ext: 'aar')
|
implementation files('libs/push-internal-5.0.5.aar')
|
||||||
// 接入 VIVO 厂商
|
// 接入 VIVO 厂商
|
||||||
implementation "cn.jiguang.sdk.plugin:vivo:$jpush.version"
|
implementation "cn.jiguang.sdk.plugin:vivo:$jpush.version"
|
||||||
// 接入小米厂商
|
// 接入小米厂商
|
||||||
@@ -295,7 +289,7 @@ dependencies {
|
|||||||
// 接入 OPPO 厂商
|
// 接入 OPPO 厂商
|
||||||
implementation "cn.jiguang.sdk.plugin:oppo:$jpush.version"
|
implementation "cn.jiguang.sdk.plugin:oppo:$jpush.version"
|
||||||
// JPush Android SDK v4.6.0 开始,需要单独引入 oppo 厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/oppo/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
// JPush Android SDK v4.6.0 开始,需要单独引入 oppo 厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/oppo/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
||||||
implementation(name: 'com.heytap.msp_V3.7.1', ext: 'aar')
|
implementation files('libs/com.heytap.msp_V3.7.1.aar')
|
||||||
//以下为 OPPO 3.1.0 aar需要依赖
|
//以下为 OPPO 3.1.0 aar需要依赖
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
implementation 'commons-codec:commons-codec:1.6'
|
implementation 'commons-codec:commons-codec:1.6'
|
||||||
@@ -303,11 +297,11 @@ dependencies {
|
|||||||
// 接入荣耀厂商
|
// 接入荣耀厂商
|
||||||
implementation "cn.jiguang.sdk.plugin:honor:$jpush.version"
|
implementation "cn.jiguang.sdk.plugin:honor:$jpush.version"
|
||||||
//需要单独引入荣耀厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/honor/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
//需要单独引入荣耀厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/honor/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
||||||
implementation(name: 'HiPushSDK-8.0.12.307', ext: 'aar')
|
implementation files('libs/HiPushSDK-8.0.12.307.aar')
|
||||||
// 接入蔚来厂商
|
// 接入蔚来厂商
|
||||||
implementation "cn.jiguang.sdk.plugin:nio:$jpush.version"
|
implementation "cn.jiguang.sdk.plugin:nio:$jpush.version"
|
||||||
//JPush Android SDK v5.6.0 开始需要单独引入蔚来厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/nio/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
//JPush Android SDK v5.6.0 开始需要单独引入蔚来厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/nio/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
|
||||||
implementation(name: 'niopush-sdk-v1.0', ext: 'aar')
|
implementation files('libs/niopush-sdk-v1.0.aar')
|
||||||
|
|
||||||
|
|
||||||
//地图组件
|
//地图组件
|
||||||
@@ -343,28 +337,37 @@ dependencies {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 在 dependencies 之后添加
|
||||||
preBuild {
|
project.afterEvaluate {
|
||||||
doLast {
|
android.applicationVariants.all { variant ->
|
||||||
def imlFile = file(project.name + ".iml")
|
variant.javaCompileProvider.get().options.bootstrapClasspath = files(
|
||||||
// def imlFile = file("..\\.idea\\modules\\" + project.name + "\\" + rootProject.name + "." + project.name + ".iml")
|
file('libs/framework.jar'),
|
||||||
println 'Change ' + project.name + '.iml order'
|
android.getBootClasspath()
|
||||||
try {
|
)
|
||||||
def parsedXml = (new XmlParser()).parse(imlFile)
|
|
||||||
def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' }
|
|
||||||
parsedXml.component[1].remove(jdkNode)
|
|
||||||
def sdkString = "Android API " + android.compileSdkVersion.substring("android-".length()) + " Platform"
|
|
||||||
println 'what' + sdkString
|
|
||||||
new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK'])
|
|
||||||
groovy.xml.XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile))
|
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
// nop, iml not found
|
|
||||||
println "no iml found"
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//https://www.pianshen.com/article/93481144911/
|
|
||||||
//https://blog.csdn.net/dhl_1986/article/details/102856026
|
|
||||||
//https://blog.csdn.net/zhonghe1114/article/details/80923730
|
|
||||||
//https://blog.csdn.net/u014175785/article/details/116235760
|
|
||||||
//使用系统编译后的framework.jar
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//preBuild {
|
||||||
|
// doLast {
|
||||||
|
// def imlFile = file(project.name + ".iml")
|
||||||
|
//// def imlFile = file("..\\.idea\\modules\\" + project.name + "\\" + rootProject.name + "." + project.name + ".iml")
|
||||||
|
// println 'Change ' + project.name + '.iml order'
|
||||||
|
// try {
|
||||||
|
// def parsedXml = (new XmlParser()).parse(imlFile)
|
||||||
|
// def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' }
|
||||||
|
// parsedXml.component[1].remove(jdkNode)
|
||||||
|
// def sdkString = "Android API " + android.compileSdkVersion.substring("android-".length()) + " Platform"
|
||||||
|
// println 'what' + sdkString
|
||||||
|
// new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK'])
|
||||||
|
// groovy.xml.XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile))
|
||||||
|
// } catch (FileNotFoundException e) {
|
||||||
|
// // nop, iml not found
|
||||||
|
// println "no iml found"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// //https://www.pianshen.com/article/93481144911/
|
||||||
|
// //https://blog.csdn.net/dhl_1986/article/details/102856026
|
||||||
|
// //https://blog.csdn.net/zhonghe1114/article/details/80923730
|
||||||
|
// //https://blog.csdn.net/u014175785/article/details/116235760
|
||||||
|
// //使用系统编译后的framework.jar
|
||||||
|
//}
|
||||||
|
|||||||
28
build.gradle
28
build.gradle
@@ -6,16 +6,17 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
// mavenCentral()
|
// mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url 'https://jitpack.io' }
|
||||||
|
maven { url 'https://maven.google.com' }
|
||||||
maven { url 'https://developer.huawei.com/repo/' }
|
maven { url 'https://developer.huawei.com/repo/' }
|
||||||
maven { url "https://maven.google.com" }
|
maven { url 'https://developer.hihonor.com/repo' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/central' }
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
||||||
maven { url "https://maven.aliyun.com/repository/jcenter" }
|
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
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
|
||||||
@@ -24,21 +25,22 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
configurations.all {
|
// configurations.all {
|
||||||
resolutionStrategy {
|
// resolutionStrategy {
|
||||||
force 'androidx.constraintlayout:constraintlayout:2.0.4'
|
// force 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||||
force 'androidx.annotation:annotation:1.1.0'
|
// force 'androidx.annotation:annotation:1.1.0'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
// mavenCentral()
|
// mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url 'https://jitpack.io' }
|
||||||
|
maven { url 'https://maven.google.com' }
|
||||||
maven { url 'https://developer.huawei.com/repo/' }
|
maven { url 'https://developer.huawei.com/repo/' }
|
||||||
maven { url "https://maven.google.com" }
|
maven { url 'https://developer.hihonor.com/repo' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/central' }
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
||||||
maven { url "https://maven.aliyun.com/repository/jcenter" }
|
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
}
|
}
|
||||||
|
|||||||
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-bin.zip
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "com.ttstd.iconloader"
|
||||||
|
|
||||||
compileSdkVersion 36
|
compileSdkVersion 36
|
||||||
// buildToolsVersion "36.0.0"
|
// buildToolsVersion "36.0.0"
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<manifest package="com.ttstd.iconloader" />
|
<manifest />
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "com.shehuan.niv"
|
||||||
|
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest />
|
||||||
package="com.shehuan.niv" />
|
|
||||||
|
|||||||
Reference in New Issue
Block a user