From c0d14425564842746968d21b7278d098926053d1 Mon Sep 17 00:00:00 2001 From: marcelpinto Date: Mon, 11 Nov 2019 14:57:46 +0800 Subject: [PATCH 1/2] Remove test files and dependencies There is no need to keep test dependencies and files that are auto-generated. --- kotlin/shrine/app/build.gradle | 6 ----- .../kotlin/shrine/ExampleInstrumentedTest.kt | 23 ------------------- .../mdc/kotlin/shrine/ExampleUnitTest.kt | 17 -------------- 3 files changed, 46 deletions(-) delete mode 100644 kotlin/shrine/app/src/androidTest/java/com/google/codelabs/mdc/kotlin/shrine/ExampleInstrumentedTest.kt delete mode 100644 kotlin/shrine/app/src/test/java/com/google/codelabs/mdc/kotlin/shrine/ExampleUnitTest.kt diff --git a/kotlin/shrine/app/build.gradle b/kotlin/shrine/app/build.gradle index 99891b02..ad1b762b 100644 --- a/kotlin/shrine/app/build.gradle +++ b/kotlin/shrine/app/build.gradle @@ -10,7 +10,6 @@ android { targetSdkVersion 28 versionCode 1 versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true } buildTypes { @@ -27,9 +26,4 @@ dependencies { implementation 'com.android.volley:volley:1.1.1' implementation 'com.google.code.gson:gson:2.8.5' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:core:1.1.0' - androidTestImplementation 'androidx.test.ext:junit:1.1.0' - androidTestImplementation 'androidx.test:runner:1.2.0-alpha05' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha05' } diff --git a/kotlin/shrine/app/src/androidTest/java/com/google/codelabs/mdc/kotlin/shrine/ExampleInstrumentedTest.kt b/kotlin/shrine/app/src/androidTest/java/com/google/codelabs/mdc/kotlin/shrine/ExampleInstrumentedTest.kt deleted file mode 100644 index 51c57e1d..00000000 --- a/kotlin/shrine/app/src/androidTest/java/com/google/codelabs/mdc/kotlin/shrine/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.google.codelabs.mdc.kotlin.shrine - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * @see [Testing documentation](http://d.android.com/tools/testing) - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - - assertEquals("com.google.codelabs.mdc.java.shrine", appContext.packageName) - } -} diff --git a/kotlin/shrine/app/src/test/java/com/google/codelabs/mdc/kotlin/shrine/ExampleUnitTest.kt b/kotlin/shrine/app/src/test/java/com/google/codelabs/mdc/kotlin/shrine/ExampleUnitTest.kt deleted file mode 100644 index ece4e31e..00000000 --- a/kotlin/shrine/app/src/test/java/com/google/codelabs/mdc/kotlin/shrine/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.google.codelabs.mdc.kotlin.shrine - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see [Testing documentation](http://d.android.com/tools/testing) - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} \ No newline at end of file From 779bf8c63d96940d8b8e78f181b0de80f30c7b90 Mon Sep 17 00:00:00 2001 From: marcelpinto Date: Mon, 11 Nov 2019 15:03:42 +0800 Subject: [PATCH 2/2] Update project dependencies - Target new sdk 29 - Update AGP - remove legacy-support-v4 dependency (not needed) --- kotlin/shrine/app/build.gradle | 7 +++---- kotlin/shrine/build.gradle | 4 ++-- kotlin/shrine/gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/kotlin/shrine/app/build.gradle b/kotlin/shrine/app/build.gradle index ad1b762b..bd6912e0 100644 --- a/kotlin/shrine/app/build.gradle +++ b/kotlin/shrine/app/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 28 + compileSdkVersion 29 defaultConfig { applicationId "com.google.codelabs.mdc.kotlin.shrine" minSdkVersion 15 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 1 versionName "1.0" vectorDrawables.useSupportLibrary = true @@ -21,8 +21,7 @@ android { } dependencies { - api 'com.google.android.material:material:1.1.0-alpha06' - implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'com.google.android.material:material:1.2.0-alpha01' implementation 'com.android.volley:volley:1.1.1' implementation 'com.google.code.gson:gson:2.8.5' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" diff --git a/kotlin/shrine/build.gradle b/kotlin/shrine/build.gradle index ba7cb175..031d769f 100644 --- a/kotlin/shrine/build.gradle +++ b/kotlin/shrine/build.gradle @@ -1,14 +1,14 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.21' + ext.kotlin_version = '1.3.50' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.3.2' + classpath 'com.android.tools.build:gradle:3.5.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/kotlin/shrine/gradle/wrapper/gradle-wrapper.properties b/kotlin/shrine/gradle/wrapper/gradle-wrapper.properties index 390b445a..990c90a8 100644 --- a/kotlin/shrine/gradle/wrapper/gradle-wrapper.properties +++ b/kotlin/shrine/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-4.10.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip