From 89aa4a79f7734dc84cf60b85dc1f1121a69492d9 Mon Sep 17 00:00:00 2001 From: KAAAsS Date: Sun, 3 Jul 2022 00:20:43 +0800 Subject: [PATCH] feat: Upgrade AGP and dependency --- app/build.gradle | 28 ++++++++++--------- app/src/main/AndroidManifest.xml | 3 +- .../zerotierfix/ZerotierFixApplication.java | 5 ++-- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ec6ab8b..b20afe8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,15 +9,16 @@ greendao { } android { - compileSdkVersion 30 + compileSdkVersion 31 buildToolsVersion "30.0.2" defaultConfig { applicationId "net.kaaass.zerotierfix" minSdkVersion 19 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 8 versionName "1.0.4" + multiDexEnabled true testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -43,22 +44,23 @@ android { dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.3.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - implementation 'androidx.navigation:navigation-fragment:2.3.4' - implementation 'androidx.navigation:navigation-ui:2.3.4' - implementation 'androidx.preference:preference:1.1.1' + implementation 'androidx.appcompat:appcompat:1.4.2' + implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'androidx.navigation:navigation-fragment:2.4.2' + implementation 'androidx.navigation:navigation-ui:2.4.2' + implementation 'androidx.preference:preference:1.2.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' + implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" - implementation 'commons-io:commons-io:2.4' - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' + implementation 'commons-io:commons-io:2.11.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation 'org.greenrobot:greendao:3.3.0' implementation 'org.greenrobot:eventbus:3.2.0' implementation 'commons-validator:commons-validator:1.7' + implementation "androidx.multidex:multidex:2.0.1" compileOnly 'org.projectlombok:lombok:1.18.20' annotationProcessor 'org.projectlombok:lombok:1.18.20' } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 39d7e21..7f67ad9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -27,7 +27,8 @@ + android:label="@string/app_name" + android:exported="true"> diff --git a/app/src/main/java/net/kaaass/zerotierfix/ZerotierFixApplication.java b/app/src/main/java/net/kaaass/zerotierfix/ZerotierFixApplication.java index b6d8cac..eac83e9 100644 --- a/app/src/main/java/net/kaaass/zerotierfix/ZerotierFixApplication.java +++ b/app/src/main/java/net/kaaass/zerotierfix/ZerotierFixApplication.java @@ -1,8 +1,9 @@ package net.kaaass.zerotierfix; -import android.app.Application; import android.util.Log; +import androidx.multidex.MultiDexApplication; + import net.kaaass.zerotierfix.model.DaoMaster; import net.kaaass.zerotierfix.model.DaoSession; import net.kaaass.zerotierfix.model.ZTOpenHelper; @@ -12,7 +13,7 @@ * * @author kaaass */ -public class ZerotierFixApplication extends Application { +public class ZerotierFixApplication extends MultiDexApplication { private DaoSession mDaoSession; public void onCreate() { diff --git a/build.gradle b/build.gradle index e3db4b6..e8ed831 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath "com.android.tools.build:gradle:4.1.1" + classpath 'com.android.tools.build:gradle:7.0.4' classpath "org.greenrobot:greendao-gradle-plugin:3.3.0" // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1f00aa3..12c8e5a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip