From e1735d6300d2edf53860d5ace944168092dc5195 Mon Sep 17 00:00:00 2001 From: Roger Hu Date: Sat, 10 Jul 2021 16:00:35 -0700 Subject: [PATCH 1/2] Switch to maven central --- app/build.gradle | 15 ++++++++++----- build.gradle | 6 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index bd7864f..2db89a2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,12 +5,12 @@ def apikeyProperties = new Properties() apikeyProperties.load(new FileInputStream(apikeyPropertiesFile)) android { - compileSdkVersion 28 + compileSdkVersion 30 defaultConfig { applicationId "com.codepath.apps.restclienttemplate" minSdkVersion 21 - targetSdkVersion 28 + targetSdkVersion 30 // Room schemas javaCompileOptions { @@ -22,6 +22,11 @@ android { buildConfigField("String", "CONSUMER_SECRET", apikeyProperties['CONSUMER_SECRET']) } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + // Related to https://github.com/scribejava/scribejava/issues/480 // Scribe expects Java 7 or this custom Apache library lintOptions { @@ -38,13 +43,13 @@ android { dependencies { implementation fileTree(dir: 'libs', include: '*.jar') - implementation 'com.codepath.libraries:android-oauth-handler:2.2.0' + implementation 'com.codepath.libraries:android-oauth-handler:2.4.0' implementation 'commons-codec:commons-codec:1.10' - implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.appcompat:appcompat:1.3.0' // Glide for remote image loading implementation 'com.github.bumptech.glide:glide:4.11.0' // Room for simple persistence with an ORM - def room_version = "2.2.5" + def room_version = "2.3.0" implementation "androidx.room:room-runtime:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version" implementation 'com.facebook.stetho:stetho:1.5.1' diff --git a/build.gradle b/build.gradle index 17457e9..2f2b9ca 100644 --- a/build.gradle +++ b/build.gradle @@ -2,16 +2,16 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.6.1' + classpath 'com.android.tools.build:gradle:4.2.2' } } allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 414d329..a91f4a5 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-5.6.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip From 68a193c444a142edf9ab2a7dcc0a59c337966e1d Mon Sep 17 00:00:00 2001 From: shisheng-1 <240274530@qq.com> Date: Thu, 11 Nov 2021 16:13:49 +0800 Subject: [PATCH 2/2] Improve GRADLE build Performance --- gradle.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gradle.properties b/gradle.properties index c73d239..9463a98 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,3 +17,5 @@ org.gradle.jvmargs=-Xmx1536m android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true +org.gradle.caching = true +org.gradle.vfs.watch = true