From 54404b2cd43a8966852c30032edcdd7fb5dd5e36 Mon Sep 17 00:00:00 2001 From: elye Date: Wed, 23 Oct 2019 14:57:38 +1100 Subject: [PATCH 1/3] Initial update of gradle 3.0.0 to 3.4.0 --- app/build.gradle | 15 +++++++-------- build.gradle | 3 ++- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 25079b4..2787e20 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.application' android { compileSdkVersion 25 - buildToolsVersion '26.0.2' defaultConfig { applicationId "iammert.com.dagger_android_injection" minSdkVersion 15 @@ -20,16 +19,16 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(dir: 'libs', include: ['*.jar']) + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:25.4.0' - testCompile 'junit:junit:4.12' - compile 'com.android.support.constraint:constraint-layout:1.0.2' + implementation 'com.android.support:appcompat-v7:25.4.0' + testImplementation 'junit:junit:4.12' + implementation 'com.android.support.constraint:constraint-layout:1.0.2' - compile 'com.google.dagger:dagger:2.13' + implementation 'com.google.dagger:dagger:2.13' annotationProcessor 'com.google.dagger:dagger-compiler:2.13' annotationProcessor 'com.google.dagger:dagger-android-processor:2.13' - compile 'com.google.dagger:dagger-android-support:2.13' + implementation 'com.google.dagger:dagger-android-support:2.13' } diff --git a/build.gradle b/build.gradle index 9be72b6..08696ee 100644 --- a/build.gradle +++ b/build.gradle @@ -5,9 +5,10 @@ buildscript { repositories { maven { url 'https://maven.google.com' } jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0' + classpath 'com.android.tools.build:gradle:3.4.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9b97a9d..8415158 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Nov 03 15:44:43 IST 2017 +#Wed Oct 23 14:38:32 AEDT 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip From 0d7cd81c22c3ef2e0843eb9adad1bdad0e1cbab2 Mon Sep 17 00:00:00 2001 From: elye Date: Wed, 23 Oct 2019 15:00:11 +1100 Subject: [PATCH 2/3] Update Android 25 to 28 --- app/build.gradle | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2787e20..66f5782 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 25 + compileSdkVersion 28 defaultConfig { applicationId "iammert.com.dagger_android_injection" minSdkVersion 15 - targetSdkVersion 25 + targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -23,12 +23,12 @@ dependencies { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'com.android.support:appcompat-v7:25.4.0' + implementation 'com.android.support:appcompat-v7:28.0.0' testImplementation 'junit:junit:4.12' - implementation 'com.android.support.constraint:constraint-layout:1.0.2' + implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.google.dagger:dagger:2.13' - annotationProcessor 'com.google.dagger:dagger-compiler:2.13' - annotationProcessor 'com.google.dagger:dagger-android-processor:2.13' - implementation 'com.google.dagger:dagger-android-support:2.13' + implementation 'com.google.dagger:dagger:2.19' + annotationProcessor 'com.google.dagger:dagger-compiler:2.19' + annotationProcessor 'com.google.dagger:dagger-android-processor:2.19' + implementation 'com.google.dagger:dagger-android-support:2.19' } From db8695def215800dc988df6009cf16b0099cb1fd Mon Sep 17 00:00:00 2001 From: elye Date: Wed, 23 Oct 2019 15:42:03 +1100 Subject: [PATCH 3/3] Upgrade to Android X --- app/build.gradle | 8 ++++---- .../dagger_android_injection/ExampleInstrumentedTest.java | 4 ++-- .../ui/detail/fragment/DetailFragment.java | 2 +- build.gradle | 1 + gradle.properties | 2 ++ 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 66f5782..db1fb3b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,7 +8,7 @@ android { targetSdkVersion 28 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -20,12 +20,12 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'androidx.appcompat:appcompat:1.1.0' testImplementation 'junit:junit:4.12' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.google.dagger:dagger:2.19' annotationProcessor 'com.google.dagger:dagger-compiler:2.19' diff --git a/app/src/androidTest/java/iammert/com/dagger_android_injection/ExampleInstrumentedTest.java b/app/src/androidTest/java/iammert/com/dagger_android_injection/ExampleInstrumentedTest.java index 1120d4a..5281ec5 100644 --- a/app/src/androidTest/java/iammert/com/dagger_android_injection/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/iammert/com/dagger_android_injection/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package iammert.com.dagger_android_injection; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.InstrumentationRegistry; +import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/app/src/main/java/iammert/com/dagger_android_injection/ui/detail/fragment/DetailFragment.java b/app/src/main/java/iammert/com/dagger_android_injection/ui/detail/fragment/DetailFragment.java index 57a85a2..5612ae6 100644 --- a/app/src/main/java/iammert/com/dagger_android_injection/ui/detail/fragment/DetailFragment.java +++ b/app/src/main/java/iammert/com/dagger_android_injection/ui/detail/fragment/DetailFragment.java @@ -2,7 +2,7 @@ import android.content.Context; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/build.gradle b/build.gradle index 08696ee..97ae8a5 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,7 @@ allprojects { repositories { jcenter() maven { url 'https://maven.google.com' } + google() } } diff --git a/gradle.properties b/gradle.properties index aac7c9b..9e6fce1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,8 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode.