From c5357031c4193c41b8f3a5fc1600abed9cf8b9d3 Mon Sep 17 00:00:00 2001 From: Kevin Block Date: Wed, 26 Feb 2025 13:27:09 -0500 Subject: [PATCH 1/5] Delete unused test files --- .../ExampleInstrumentedTest.java | 26 ------------------- .../material/ExampleInstrumentedTest.java | 26 ------------------- .../recyclerview/ExampleInstrumentedTest.java | 26 ------------------- .../savedstate/ExampleInstrumentedTest.kt | 22 ---------------- .../androidx/savedstate/ExampleUnitTest.kt | 16 ------------ .../view/ExampleInstrumentedTest.java | 26 ------------------- 6 files changed, 142 deletions(-) delete mode 100644 constraintlayout/src/androidTest/java/com/tunjid/androidx/constraintlayout/ExampleInstrumentedTest.java delete mode 100644 material/src/androidTest/java/com/tunjid/androidx/material/ExampleInstrumentedTest.java delete mode 100644 recyclerview/src/androidTest/java/com/tunjid/androidx/recyclerview/ExampleInstrumentedTest.java delete mode 100644 savedstate/src/androidTest/java/com/tunjid/androidx/savedstate/ExampleInstrumentedTest.kt delete mode 100644 savedstate/src/test/java/com/tunjid/androidx/savedstate/ExampleUnitTest.kt delete mode 100644 view/src/androidTest/java/com/tunjid/androidx/view/ExampleInstrumentedTest.java diff --git a/constraintlayout/src/androidTest/java/com/tunjid/androidx/constraintlayout/ExampleInstrumentedTest.java b/constraintlayout/src/androidTest/java/com/tunjid/androidx/constraintlayout/ExampleInstrumentedTest.java deleted file mode 100644 index 572f2f6d..00000000 --- a/constraintlayout/src/androidTest/java/com/tunjid/androidx/constraintlayout/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.tunjid.androidx.constraintlayout; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("com.tunjid.androidx.constraintlayout.test", appContext.getPackageName()); - } -} diff --git a/material/src/androidTest/java/com/tunjid/androidx/material/ExampleInstrumentedTest.java b/material/src/androidTest/java/com/tunjid/androidx/material/ExampleInstrumentedTest.java deleted file mode 100644 index b3cd1357..00000000 --- a/material/src/androidTest/java/com/tunjid/androidx/material/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.tunjid.androidx.material; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("com.tunjid.androidx.material.test", appContext.getPackageName()); - } -} diff --git a/recyclerview/src/androidTest/java/com/tunjid/androidx/recyclerview/ExampleInstrumentedTest.java b/recyclerview/src/androidTest/java/com/tunjid/androidx/recyclerview/ExampleInstrumentedTest.java deleted file mode 100644 index 394f7c4d..00000000 --- a/recyclerview/src/androidTest/java/com/tunjid/androidx/recyclerview/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.tunjid.androidx.recyclerview; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("com.tunjid.androidx.recyclerview.test", appContext.getPackageName()); - } -} diff --git a/savedstate/src/androidTest/java/com/tunjid/androidx/savedstate/ExampleInstrumentedTest.kt b/savedstate/src/androidTest/java/com/tunjid/androidx/savedstate/ExampleInstrumentedTest.kt deleted file mode 100644 index 37e89ada..00000000 --- a/savedstate/src/androidTest/java/com/tunjid/androidx/savedstate/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.tunjid.androidx.savedstate - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.* -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.tunjid.androidx.savedstate.test", appContext.packageName) - } -} diff --git a/savedstate/src/test/java/com/tunjid/androidx/savedstate/ExampleUnitTest.kt b/savedstate/src/test/java/com/tunjid/androidx/savedstate/ExampleUnitTest.kt deleted file mode 100644 index 780350f9..00000000 --- a/savedstate/src/test/java/com/tunjid/androidx/savedstate/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.tunjid.androidx.savedstate - -import org.junit.Assert.* -import org.junit.Test - -/** - * 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) - } -} diff --git a/view/src/androidTest/java/com/tunjid/androidx/view/ExampleInstrumentedTest.java b/view/src/androidTest/java/com/tunjid/androidx/view/ExampleInstrumentedTest.java deleted file mode 100644 index 2364857a..00000000 --- a/view/src/androidTest/java/com/tunjid/androidx/view/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.tunjid.androidx.view; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("com.tunjid.androidx.view.test", appContext.getPackageName()); - } -} From e8c42597f924c77abfd20dce90db7fec673b9f90 Mon Sep 17 00:00:00 2001 From: Kevin Block Date: Wed, 26 Feb 2025 13:27:28 -0500 Subject: [PATCH 2/5] Bump runner versions --- build.gradle | 6 +++--- communications/build.gradle | 2 +- core/build.gradle | 8 ++++---- navigation/build.gradle | 6 +++--- recyclerview/build.gradle | 2 +- test/build.gradle | 10 +++++----- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index a5d171b1..2f34660d 100644 --- a/build.gradle +++ b/build.gradle @@ -26,9 +26,9 @@ buildscript { constraintLayout = 'androidx.constraintlayout:constraintlayout:2.0.4' dynamicAnimations = 'androidx.dynamicanimation:dynamicanimation:1.1.0-alpha03' dynamicAnimationsKtx = 'androidx.dynamicanimation:dynamicanimation-ktx:1.0.0-alpha03' - espressoContrib = 'androidx.test.espresso:espresso-contrib:3.3.0' - espressoCore = 'androidx.test.espresso:espresso-core:3.3.0' - espressoIdlingResource = 'androidx.test.espresso.idling:idling-concurrent:3.3.0' + espressoContrib = 'androidx.test.espresso:espresso-contrib:3.5.1' + espressoCore = 'androidx.test.espresso:espresso-core:3.5.1' + espressoIdlingResource = 'androidx.test.espresso.idling:idling-concurrent:3.5.1' fragment = 'androidx.fragment:fragment:1.3.3' fragmentKtx = 'androidx.fragment:fragment-ktx:1.3.3' kotlin = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" diff --git a/communications/build.gradle b/communications/build.gradle index acb62dae..ddbda4ce 100644 --- a/communications/build.gradle +++ b/communications/build.gradle @@ -8,7 +8,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' androidTestImplementation project(':test') - androidTestImplementation 'androidx.test:runner:1.3.0' + androidTestImplementation 'androidx.test:runner:1.5.0' } diff --git a/core/build.gradle b/core/build.gradle index e997fb5a..5677d367 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -47,11 +47,11 @@ dependencies { new Tuple2('com.google.android.material', 'material') ] - androidTestExclusions('androidx.test:core:1.3.0', exclusions) + androidTestExclusions('androidx.test:core:1.5.0', exclusions) androidTestExclusions('androidx.test.ext:junit:1.1.2', exclusions) - androidTestExclusions('androidx.test:runner:1.3.0', exclusions) - androidTestExclusions('androidx.test:rules:1.3.0', exclusions) - androidTestExclusions('androidx.test:runner:1.3.0', exclusions) + androidTestExclusions('androidx.test:runner:1.5.0', exclusions) + androidTestExclusions('androidx.test:rules:1.5.0', exclusions) + androidTestExclusions('androidx.test:runner:1.5.0', exclusions) androidTestExclusions('org.robolectric:robolectric:4.5.1', exclusions) androidTestExclusions('androidx.test.espresso:espresso-core:3.3.0', exclusions) androidTestExclusions('androidx.test.espresso:espresso-contrib:3.3.0', exclusions) diff --git a/navigation/build.gradle b/navigation/build.gradle index 6e63f5cf..c9a6653a 100644 --- a/navigation/build.gradle +++ b/navigation/build.gradle @@ -47,9 +47,9 @@ dependencies { ] androidTestExclusions('androidx.test.ext:junit:1.1.2', exclusions) - androidTestExclusions('androidx.test:runner:1.3.0', exclusions) - androidTestExclusions('androidx.test:rules:1.3.0', exclusions) - androidTestExclusions('androidx.test:runner:1.3.0', exclusions) + androidTestExclusions('androidx.test:runner:1.5.0', exclusions) + androidTestExclusions('androidx.test:rules:1.5.0', exclusions) + androidTestExclusions('androidx.test:runner:1.5.0', exclusions) androidTestExclusions('androidx.test.espresso:espresso-core:3.3.0', exclusions) androidTestExclusions('androidx.test.espresso:espresso-contrib:3.3.0', exclusions) androidTestExclusions('androidx.test.espresso:espresso-intents:3.3.0', exclusions) diff --git a/recyclerview/build.gradle b/recyclerview/build.gradle index da888b3c..d94633bf 100644 --- a/recyclerview/build.gradle +++ b/recyclerview/build.gradle @@ -25,6 +25,6 @@ dependencies { implementation project(':functions') testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.3.0' + androidTestImplementation 'androidx.test:runner:1.5.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' } \ No newline at end of file diff --git a/test/build.gradle b/test/build.gradle index 02379b19..c6e62037 100644 --- a/test/build.gradle +++ b/test/build.gradle @@ -35,9 +35,9 @@ dependencies { new Tuple2('com.google.android.material', 'material') ] - androidTestExclusions('androidx.test:runner:1.3.0', exclusions) - androidTestExclusions('androidx.test:rules:1.3.0', exclusions) - androidTestExclusions('androidx.test.espresso:espresso-core:3.3.0', exclusions) - androidTestExclusions('androidx.test.espresso:espresso-contrib:3.3.0', exclusions) - androidTestExclusions('androidx.test.espresso:espresso-intents:3.3.0', exclusions) + androidTestExclusions('androidx.test:runner:1.5.0', exclusions) + androidTestExclusions('androidx.test:rules:1.5.0', exclusions) + androidTestExclusions('androidx.test.espresso:espresso-core:3.5.1', exclusions) + androidTestExclusions('androidx.test.espresso:espresso-contrib:3.5.1', exclusions) + androidTestExclusions('androidx.test.espresso:espresso-intents:3.5.1', exclusions) } \ No newline at end of file From dd74c8521c1028efb77402a5898a06b01d7bc4c2 Mon Sep 17 00:00:00 2001 From: Kevin Block Date: Wed, 26 Feb 2025 13:27:40 -0500 Subject: [PATCH 3/5] Downgrade gradle due to protobuf issue --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2f34660d..8f94bfe7 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:7.0.4' classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.0.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" From 9556775368b5d828d154669b487b38b1ab665b9d Mon Sep 17 00:00:00 2001 From: Kevin Block Date: Wed, 26 Feb 2025 13:34:39 -0500 Subject: [PATCH 4/5] Test failure --- .../tunjid/androidx/navigation/MultiStackNavigatorTest.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/navigation/src/androidTest/java/com/tunjid/androidx/navigation/MultiStackNavigatorTest.kt b/navigation/src/androidTest/java/com/tunjid/androidx/navigation/MultiStackNavigatorTest.kt index 71092ac5..548ecea7 100644 --- a/navigation/src/androidTest/java/com/tunjid/androidx/navigation/MultiStackNavigatorTest.kt +++ b/navigation/src/androidTest/java/com/tunjid/androidx/navigation/MultiStackNavigatorTest.kt @@ -13,6 +13,7 @@ import org.junit.Assert.assertNotSame import org.junit.Assert.assertNull import org.junit.Assert.assertSame import org.junit.Assert.assertTrue +import org.junit.Assert.fail import org.junit.Before import org.junit.Rule import org.junit.Test @@ -86,6 +87,11 @@ class MultiStackNavigatorTest { } } + @Test + fun testFailure() { + fail() + } + @Test fun testIndependentStacks() { val multiStackNavigator = multiStackNavigator(MultiStackNavigator.BackStackType.UniqueEntries) From 5ddc208d6fcd71d04a1581b02456ebdb51c24893 Mon Sep 17 00:00:00 2001 From: Kevin Block Date: Wed, 26 Feb 2025 13:38:40 -0500 Subject: [PATCH 5/5] Revert "Test failure" This reverts commit 9556775368b5d828d154669b487b38b1ab665b9d. --- .../tunjid/androidx/navigation/MultiStackNavigatorTest.kt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/navigation/src/androidTest/java/com/tunjid/androidx/navigation/MultiStackNavigatorTest.kt b/navigation/src/androidTest/java/com/tunjid/androidx/navigation/MultiStackNavigatorTest.kt index 548ecea7..71092ac5 100644 --- a/navigation/src/androidTest/java/com/tunjid/androidx/navigation/MultiStackNavigatorTest.kt +++ b/navigation/src/androidTest/java/com/tunjid/androidx/navigation/MultiStackNavigatorTest.kt @@ -13,7 +13,6 @@ import org.junit.Assert.assertNotSame import org.junit.Assert.assertNull import org.junit.Assert.assertSame import org.junit.Assert.assertTrue -import org.junit.Assert.fail import org.junit.Before import org.junit.Rule import org.junit.Test @@ -87,11 +86,6 @@ class MultiStackNavigatorTest { } } - @Test - fun testFailure() { - fail() - } - @Test fun testIndependentStacks() { val multiStackNavigator = multiStackNavigator(MultiStackNavigator.BackStackType.UniqueEntries)