升级:gradle依赖版本

pull/286/head
pppscn 1 year ago
parent d144ccead0
commit 1b67930220

@ -1,276 +1,276 @@
plugins { plugins {
id 'com.android.application' id 'com.android.application'
id 'kotlin-android' id 'kotlin-android'
id 'kotlin-kapt' id 'kotlin-kapt'
id 'kotlin-parcelize' id 'kotlin-parcelize'
id 'img-optimizer' id 'img-optimizer'
id 'com.yanzhenjie.andserver' id 'com.yanzhenjie.andserver'
} }
def keyProps = new Properties() def keyProps = new Properties()
def keyPropsFile = rootProject.file('keystore/keystore.properties') def keyPropsFile = rootProject.file('keystore/keystore.properties')
if (keyPropsFile.exists()) { if (keyPropsFile.exists()) {
keyProps.load(new FileInputStream(keyPropsFile)) keyProps.load(new FileInputStream(keyPropsFile))
} }
//true //true
if (isNeedPackage.toBoolean() && isUseBooster.toBoolean()) { if (isNeedPackage.toBoolean() && isUseBooster.toBoolean()) {
apply plugin: 'com.didiglobal.booster' apply plugin: 'com.didiglobal.booster'
} }
android { android {
//noinspection GradleDependency //noinspection GradleDependency
buildToolsVersion build_versions.build_tools buildToolsVersion build_versions.build_tools
compileSdkVersion build_versions.target_sdk compileSdkVersion build_versions.target_sdk
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
buildFeatures { buildFeatures {
viewBinding true viewBinding true
} }
defaultConfig { defaultConfig {
applicationId "com.idormy.sms.forwarder" applicationId "com.idormy.sms.forwarder"
minSdkVersion build_versions.min_sdk minSdkVersion build_versions.min_sdk
targetSdkVersion build_versions.target_sdk targetSdkVersion build_versions.target_sdk
versionCode build_versions.version_code versionCode build_versions.version_code
versionName build_versions.version_name versionName build_versions.version_name
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
javaCompileOptions { javaCompileOptions {
annotationProcessorOptions { annotationProcessorOptions {
arguments = [moduleName: project.getName()] arguments = [moduleName: project.getName()]
} }
} }
ndk { ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
} }
} }
signingConfigs { signingConfigs {
release { release {
keyAlias keyProps['keyAlias'] keyAlias keyProps['keyAlias']
keyPassword keyProps['keyPassword'] keyPassword keyProps['keyPassword']
storeFile keyProps['storeFile'] ? file(keyProps['storeFile']) : null storeFile keyProps['storeFile'] ? file(keyProps['storeFile']) : null
storePassword keyProps['storePassword'] storePassword keyProps['storePassword']
} }
debug { debug {
keyAlias keyProps['keyAlias'] keyAlias keyProps['keyAlias']
keyPassword keyProps['keyPassword'] keyPassword keyProps['keyPassword']
storeFile keyProps['storeFile'] ? file(keyProps['storeFile']) : null storeFile keyProps['storeFile'] ? file(keyProps['storeFile']) : null
storePassword keyProps['storePassword'] storePassword keyProps['storePassword']
} }
} }
buildTypes { buildTypes {
release { release {
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (isNeedPackage.toBoolean()) { if (isNeedPackage.toBoolean()) {
signingConfig signingConfigs.release signingConfig signingConfigs.release
if (file('local.properties').exists()) { if (file('local.properties').exists()) {
Properties properties = new Properties() Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream()) properties.load(project.rootProject.file('local.properties').newDataInputStream())
def appID = properties.getProperty("APP_ID_UMENG") def appID = properties.getProperty("APP_ID_UMENG")
if (appID != null) { if (appID != null) {
buildConfigField "String", "APP_ID_UMENG", appID buildConfigField "String", "APP_ID_UMENG", appID
} else { } else {
buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"' buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"'
} }
} else { } else {
buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"' buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"'
} }
} else { } else {
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"' buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"'
} }
} }
debug { debug {
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (isNeedPackage.toBoolean()) { if (isNeedPackage.toBoolean()) {
signingConfig signingConfigs.release signingConfig signingConfigs.release
if (file('local.properties').exists()) { if (file('local.properties').exists()) {
Properties properties = new Properties() Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream()) properties.load(project.rootProject.file('local.properties').newDataInputStream())
def appID = properties.getProperty("APP_ID_UMENG") def appID = properties.getProperty("APP_ID_UMENG")
if (appID != null) { if (appID != null) {
buildConfigField "String", "APP_ID_UMENG", appID buildConfigField "String", "APP_ID_UMENG", appID
} else { } else {
buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"' buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"'
} }
} else { } else {
buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"' buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"'
} }
} else { } else {
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"' buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"'
} }
} }
/*debug { /*debug {
debuggable true debuggable true
minifyEnabled false minifyEnabled false
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"' buildConfigField "String", "APP_ID_UMENG", '"60254fc7425ec25f10f4293e"'
}*/ }*/
} }
//ABICPU //ABICPU
splits { splits {
abi { abi {
enable true enable true
reset() reset()
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
universalApk true universalApk true
} }
} }
def abiCodes = ['universal': 1, 'armeabi-v7a': 2, 'arm64-v8a': 3, 'x86': 4, 'x86_64': 5] def abiCodes = ['universal': 1, 'armeabi-v7a': 2, 'arm64-v8a': 3, 'x86': 4, 'x86_64': 5]
packagingOptions { packagingOptions {
//FrpcLibso //FrpcLibso
if (isNeedPackage.toBoolean()) { if (isNeedPackage.toBoolean()) {
exclude 'lib/armeabi-v7a/libgojni.so' exclude 'lib/armeabi-v7a/libgojni.so'
exclude 'lib/arm64-v8a/libgojni.so' exclude 'lib/arm64-v8a/libgojni.so'
exclude 'lib/x86/libgojni.so' exclude 'lib/x86/libgojni.so'
exclude 'lib/x86_64/libgojni.so' exclude 'lib/x86_64/libgojni.so'
} }
resources { resources {
pickFirst 'META-INF/LICENSE.md' pickFirst 'META-INF/LICENSE.md'
pickFirst 'META-INF/NOTICE.md' pickFirst 'META-INF/NOTICE.md'
excludes += ['META-INF/DEPENDENCIES.txt', 'META-INF/LICENSE.txt', 'META-INF/NOTICE.txt', 'META-INF/NOTICE', 'META-INF/LICENSE', 'META-INF/DEPENDENCIES', 'META-INF/notice.txt', 'META-INF/license.txt', 'META-INF/dependencies.txt', 'META-INF/LGPL2.1'] excludes += ['META-INF/DEPENDENCIES.txt', 'META-INF/LICENSE.txt', 'META-INF/NOTICE.txt', 'META-INF/NOTICE', 'META-INF/LICENSE', 'META-INF/DEPENDENCIES', 'META-INF/notice.txt', 'META-INF/license.txt', 'META-INF/dependencies.txt', 'META-INF/LGPL2.1']
} }
} }
android.applicationVariants.all { variant -> android.applicationVariants.all { variant ->
// Assigns a different version code for each output APK. // Assigns a different version code for each output APK.
variant.outputs.each { variant.outputs.each {
output -> output ->
def date = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08")) def date = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08"))
//noinspection GrDeprecatedAPIUsage //noinspection GrDeprecatedAPIUsage
def abiName = output.getFilter(com.android.build.OutputFile.ABI) def abiName = output.getFilter(com.android.build.OutputFile.ABI)
if (abiName == null) abiName = "universal" if (abiName == null) abiName = "universal"
output.versionCodeOverride = abiCodes.get(abiName, 0) * 100000 + variant.versionCode output.versionCodeOverride = abiCodes.get(abiName, 0) * 100000 + variant.versionCode
output.outputFileName = "SmsForwarder_${variant.name}_${versionName}_${output.versionCode}_${date}_${abiName}.apk" output.outputFileName = "SmsForwarder_${variant.name}_${versionName}_${output.versionCode}_${date}_${abiName}.apk"
} }
} }
sourceSets { sourceSets {
main { main {
jniLibs.srcDirs = ['libs'] jniLibs.srcDirs = ['libs']
} }
} }
lint { lint {
abortOnError false abortOnError false
} }
namespace 'com.idormy.sms.forwarder' namespace 'com.idormy.sms.forwarder'
} }
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
//frpc //frpc
implementation files('libs/frpclib.aar') implementation files('libs/frpclib.aar')
testImplementation deps.junit testImplementation deps.junit
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation deps.espresso.core androidTestImplementation deps.espresso.core
implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.core:core-ktx:1.9.0'
implementation "androidx.activity:activity-ktx:1.6.0" implementation "androidx.activity:activity-ktx:1.6.1"
implementation "androidx.fragment:fragment-ktx:1.5.3" implementation "androidx.fragment:fragment-ktx:1.5.4"
implementation "androidx.cardview:cardview:1.0.0" implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.preference:preference-ktx:1.2.0' implementation 'androidx.preference:preference-ktx:1.2.0'
// //
implementation deps.androidx.multidex implementation deps.androidx.multidex
//vLayouthttps://github.com/alibaba/vlayout //vLayouthttps://github.com/alibaba/vlayout
implementation 'com.alibaba.android:vlayout:1.3.0' implementation 'com.alibaba.android:vlayout:1.3.0'
// //
implementation 'com.github.xuexiangjys.SmartRefreshLayout:refresh-header:1.1.5' implementation 'com.github.xuexiangjys.SmartRefreshLayout:refresh-header:1.1.5'
implementation 'com.github.xuexiangjys.SmartRefreshLayout:refresh-layout:1.1.5' implementation 'com.github.xuexiangjys.SmartRefreshLayout:refresh-layout:1.1.5'
//WebView //WebView
implementation 'com.github.xuexiangjys.AgentWeb:agentweb-core:1.0.0' implementation 'com.github.xuexiangjys.AgentWeb:agentweb-core:1.0.0'
implementation 'com.github.xuexiangjys.AgentWeb:agentweb-download:1.0.0'// implementation 'com.github.xuexiangjys.AgentWeb:agentweb-download:1.0.0'//
//mmkvhttps://github.com/Tencent/MMKV //mmkvhttps://github.com/Tencent/MMKV
implementation 'com.tencent:mmkv:1.2.14' implementation 'com.tencent:mmkv:1.2.15'
//AutoSizehttps://github.com/JessYanCoding/AndroidAutoSize //AutoSizehttps://github.com/JessYanCoding/AndroidAutoSize
implementation 'me.jessyan:autosize:1.2.1' implementation 'me.jessyan:autosize:1.2.1'
//umeng //umeng
implementation 'com.umeng.umsdk:common:9.5.2' implementation 'com.umeng.umsdk:common:9.5.4'
implementation 'com.umeng.umsdk:asms:1.6.3' implementation 'com.umeng.umsdk:asms:1.6.3'
// //
implementation 'me.samlss:broccoli:1.0.0' implementation 'me.samlss:broccoli:1.0.0'
//RichTexthttps://github.com/zzhoujay/RichText //RichTexthttps://github.com/zzhoujay/RichText
implementation 'com.zzhoujay.richtext:richtext:3.0.8' implementation 'com.zzhoujay.richtext:richtext:3.0.8'
// //
//implementation 'com.meituan.android.walle:library:1.1.6' //implementation 'com.meituan.android.walle:library:1.1.6'
api("androidx.work:work-multiprocess:2.7.1") api("androidx.work:work-multiprocess:2.7.1")
api("androidx.work:work-runtime-ktx:2.7.1") api("androidx.work:work-runtime-ktx:2.7.1")
//Android Room //Android Room
def room_version = '2.4.3' def room_version = '2.4.3'
implementation "androidx.room:room-ktx:$room_version" implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-paging:$room_version" implementation "androidx.room:room-paging:$room_version"
implementation "androidx.room:room-rxjava2:$room_version" implementation "androidx.room:room-rxjava2:$room_version"
kapt "androidx.room:room-compiler:$room_version" kapt "androidx.room:room-compiler:$room_version"
//CodeViewhttps://github.com/AmrDeveloper/CodeView //CodeViewhttps://github.com/AmrDeveloper/CodeView
implementation 'com.github.AmrDeveloper:CodeView:1.3.5' implementation 'com.github.AmrDeveloper:CodeView:1.3.7'
//LiveEventBushttps://github.com/JeremyLiao/LiveEventBus //LiveEventBushttps://github.com/JeremyLiao/LiveEventBus
implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0' implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0'
//MarkdownViewhttps://github.com/tiagohm/MarkdownView //MarkdownViewhttps://github.com/tiagohm/MarkdownView
implementation 'com.github.tiagohm.MarkdownView:library:0.19.0' implementation 'com.github.tiagohm.MarkdownView:library:0.19.0'
implementation 'com.github.tiagohm.MarkdownView:emoji:0.19.0' implementation 'com.github.tiagohm.MarkdownView:emoji:0.19.0'
def retrofit2_version = '2.9.0' def retrofit2_version = '2.9.0'
implementation "com.squareup.retrofit2:retrofit:$retrofit2_version" implementation "com.squareup.retrofit2:retrofit:$retrofit2_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit2_version" implementation "com.squareup.retrofit2:converter-gson:$retrofit2_version"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit2_version" implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit2_version"
def paging_version = "3.1.1" def paging_version = "3.1.1"
implementation "androidx.paging:paging-runtime-ktx:$paging_version" implementation "androidx.paging:paging-runtime-ktx:$paging_version"
// alternatively - without Android dependencies for tests // alternatively - without Android dependencies for tests
testImplementation "androidx.paging:paging-common-ktx:$paging_version" testImplementation "androidx.paging:paging-common-ktx:$paging_version"
//https://github.com/getActivity/XXPermissions //https://github.com/getActivity/XXPermissions
implementation 'com.github.getActivity:XXPermissions:16.2' implementation 'com.github.getActivity:XXPermissions:16.6'
def mail_version = '1.6.7' def mail_version = '1.6.7'
implementation "com.sun.mail:android-mail:$mail_version" implementation "com.sun.mail:android-mail:$mail_version"
implementation "com.sun.mail:android-activation:$mail_version" implementation "com.sun.mail:android-activation:$mail_version"
//Android Keep Alive()Cactus JobScheduleronePix()WorkManager //Android Keep Alive()Cactus JobScheduleronePix()WorkManager
//https://github.com/gyf-dev/Cactus //https://github.com/gyf-dev/Cactus
implementation 'com.gyf.cactus:cactus:1.1.3-beta13' implementation 'com.gyf.cactus:cactus:1.1.3-beta13'
//HTTPhttps://github.com/yanzhenjie/AndServer //HTTPhttps://github.com/yanzhenjie/AndServer
implementation 'cn.ppps.andserver:api:2.1.11' implementation 'cn.ppps.andserver:api:2.1.11'
kapt 'cn.ppps.andserver:processor:2.1.11' kapt 'cn.ppps.andserver:processor:2.1.11'
//SM4 JAVA(BC) //SM4 JAVA(BC)
api "org.bouncycastle:bcprov-jdk15on:1.69" api 'org.bouncycastle:bcprov-jdk15on:1.70'
} }
//X-Library //X-Library
apply from: 'x-library.gradle' apply from: 'x-library.gradle'
//walle //walle
//apply from: 'multiple-channel.gradle' //apply from: 'multiple-channel.gradle'

@ -1,51 +1,51 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
apply from: './versions.gradle' apply from: './versions.gradle'
addRepos(repositories) // addRepos(repositories) //
dependencies { dependencies {
classpath deps.android_gradle_plugin classpath "com.android.tools.build:gradle:$versions.android_gradle_plugin"
classpath deps.android_maven_gradle_plugin classpath deps.android_maven_gradle_plugin
// //
classpath 'com.chenenyu:img-optimizer:1.2.0' classpath 'com.chenenyu:img-optimizer:1.2.0'
// //
classpath 'com.meituan.android.walle:plugin:1.1.6' classpath 'com.meituan.android.walle:plugin:1.1.6'
// //
if (isNeedPackage.toBoolean() && isUseBooster.toBoolean()) { if (isNeedPackage.toBoolean() && isUseBooster.toBoolean()) {
classpath deps.booster.gradle_plugin classpath deps.booster.gradle_plugin
classpath deps.booster.task_processed_res classpath deps.booster.task_processed_res
classpath deps.booster.task_resource_deredundancy classpath deps.booster.task_resource_deredundancy
} }
//AndServer //AndServer
classpath 'cn.ppps.andserver:plugin:2.1.11' classpath 'cn.ppps.andserver:plugin:2.1.11'
} }
} }
//allprojects { //allprojects {
// addRepos(repositories) // addRepos(repositories)
//} //}
allprojects { allprojects {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://repo1.maven.org/maven2/' } maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://oss.sonatype.org/content/repositories/public' } maven { url 'https://oss.sonatype.org/content/repositories/public' }
maven { url "https://jitpack.io" } maven { url "https://jitpack.io" }
} }
} }
task clean(type: Delete) { task clean(type: Delete) {
delete rootProject.buildDir delete rootProject.buildDir
FileTree tree = fileTree(dir: rootProject.getRootDir()) FileTree tree = fileTree(dir: rootProject.getRootDir())
tree.each { File file -> tree.each { File file ->
if (file.toString().contains("ajcore") && file.toString().endsWith(".txt")) { if (file.toString().contains("ajcore") && file.toString().endsWith(".txt")) {
delete file delete file
} }
} }
} }

@ -1,6 +1,6 @@
#Fri Jun 28 16:23:16 CST 2019 #Fri Jan 20 10:28:07 CST 2023
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME

@ -30,9 +30,9 @@ versions.rxandroid = "2.1.1"
versions.rxbinding = "2.2.0" versions.rxbinding = "2.2.0"
versions.butterknife = "10.2.3" versions.butterknife = "10.2.3"
versions.runner = "1.4.0" versions.runner = "1.4.0"
versions.gson = "2.9.1" //https://github.com/google/gson versions.gson = "2.10.1" //https://github.com/google/gson
versions.okhttp3 = "3.12.13" // API 19 versions.okhttp3 = "3.12.13" // API 19
versions.leakcanary = "2.9.1" //https://github.com/square/leakcanary versions.leakcanary = "2.10" //https://github.com/square/leakcanary
versions.lifecycle = "2.2.0" versions.lifecycle = "2.2.0"
versions.kotlin = '1.6.21' versions.kotlin = '1.6.21'

Loading…
Cancel
Save