diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 1f71170..6d0ee1c 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index e430263..7435947 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,7 +13,7 @@ def keystorePath = System.getenv('PWD') + "/app/keystore.jks" def keystore = file(keystorePath).exists() ? file(keystorePath) : null android { namespace 'com.appttude.h_mal.atlas_weather' - compileSdk 33 + compileSdk = Integer.parseInt(TARGET_SDK_VERSION) defaultConfig { applicationId "com.appttude.h_mal.atlas_weather" minSdkVersion MIN_SDK_VERSION @@ -111,7 +111,6 @@ android { lint { abortOnError false } - } dependencies { @@ -132,9 +131,12 @@ dependencies { implementation "androidx.lifecycle:lifecycle-viewmodel:$ANDROID_LIFECYCLE" implementation "androidx.recyclerview:recyclerview:$RECYCLER_VIEW" implementation "androidx.swiperefreshlayout:swiperefreshlayout:$SWIPE_REFRESH" - implementation 'com.google.code.gson:gson:2.8.5' - implementation 'com.google.guava:guava:29.0-android' + implementation "com.google.code.gson:gson:$GSON" + implementation "com.google.guava:guava:$GUAVA" implementation 'io.reactivex.rxjava2:rxjava:2.2.0' + // force upgrade to 1.1.0 because its required by androidTestImplementation, + // and without this statement AGP will silently downgrade to tracing:1.0.0 + implementation "androidx.tracing:tracing:1.1.0" / * Google play services * / implementation "com.google.android.gms:play-services-location:$GOOGLE_PLAY_SERVICE" / * Unit testing * / @@ -153,9 +155,9 @@ dependencies { implementation "androidx.navigation:navigation-runtime:$NAVIGATION_VERSION" implementation "androidx.navigation:navigation-ui:$NAVIGATION_VERSION" / * android unit testing and espresso * / - androidTestImplementation "androidx.test:rules:$TEST_KTX_VERSION" - androidTestImplementation 'androidx.test:core:1.5.0' - androidTestImplementation 'androidx.test:monitor:1.6.1' + androidTestImplementation "androidx.test:rules:$ANDROIDX_TEST" + androidTestImplementation "androidx.test:core:$ANDROIDX_TEST" + androidTestImplementation "androidx.test:monitor:$TEST_MONITOR" androidTestImplementation "androidx.test.ext:junit:$TEST_JUNIT_VERSION" androidTestRuntimeOnly "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN_VERSION" androidTestImplementation "androidx.test.espresso:espresso-core:$ESPRESSO_VERSION" diff --git a/app/src/androidTest/java/com/appttude/h_mal/atlas_weather/BaseTestRobot.kt b/app/src/androidTest/java/com/appttude/h_mal/atlas_weather/BaseTestRobot.kt index 8f367eb..c9fe6ac 100644 --- a/app/src/androidTest/java/com/appttude/h_mal/atlas_weather/BaseTestRobot.kt +++ b/app/src/androidTest/java/com/appttude/h_mal/atlas_weather/BaseTestRobot.kt @@ -31,7 +31,7 @@ open class BaseTestRobot { fun goBack() = Espresso.pressBack() - fun fillEditText(resId: Int, text: String?): ViewInteraction = + fun fillEditText(resId: Int, text: String): ViewInteraction = onView(withId(resId)).perform( ViewActions.replaceText(text), ViewActions.closeSoftKeyboard() diff --git a/app/src/androidTest/java/com/appttude/h_mal/atlas_weather/utils/TestUtils.kt b/app/src/androidTest/java/com/appttude/h_mal/atlas_weather/utils/TestUtils.kt index 2305ea8..3f8bc1d 100644 --- a/app/src/androidTest/java/com/appttude/h_mal/atlas_weather/utils/TestUtils.kt +++ b/app/src/androidTest/java/com/appttude/h_mal/atlas_weather/utils/TestUtils.kt @@ -13,7 +13,7 @@ fun LiveData.getOrAwaitValue( var data: T? = null val latch = CountDownLatch(1) val observer = object : Observer { - override fun onChanged(o: T?) { + override fun onChanged(o: T) { data = o latch.countDown() this@getOrAwaitValue.removeObserver(this) diff --git a/build.gradle b/build.gradle index 696d703..4081e02 100644 --- a/build.gradle +++ b/build.gradle @@ -11,8 +11,8 @@ buildscript { } plugins { - id 'com.android.application' version "$ANDROID_APPLICATION" apply false - id 'com.android.library' version "$ANDROID_LIBRARY" apply false + id 'com.android.application' version "$GRADLE_PLUGIN_VERSION" apply false + id 'com.android.library' version "$GRADLE_PLUGIN_VERSION" apply false id 'com.google.gms.google-services' version "$GOOGLE_SERVICES" apply false id 'org.jetbrains.kotlin.android' version "$KOTLIN_VERSION" apply false id 'com.autonomousapps.dependency-analysis' version "$GRADLE_ANALYZE_VERSION" diff --git a/gradle.properties b/gradle.properties index dd5c2b9..ecfd16b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,46 +21,50 @@ android.nonFinalResIds=false # Plugin versions -ANDROID_CORE = 1.10.1 +ANDROID_CORE = 1.13.1 CUSTOM_VIEW = 1.1.0 CARD_VIEW = 1.0.0 -FRAGMENT_VERSION = 1.5.4 -MATERIAL_VERSION = 1.8.0 -APP_COMPAT = 1.6.0 +FRAGMENT_VERSION = 1.8.0 +MATERIAL_VERSION = 1.12.0 +APP_COMPAT = 1.7.0 CONSTR_LAYOUT_VERSION = 2.1.4 -ANDROID_LIFECYCLE = 2.5.1 -RECYCLER_VIEW = 1.1.0 -SWIPE_REFRESH = 1.0.0 +ANDROID_LIFECYCLE = 2.8.2 +RECYCLER_VIEW = 1.3.2 +SWIPE_REFRESH = 1.1.0 PERMISSIONS_DISPATCHER = 4.9.2 TOMTOM_SEARCH = 2.4771 TOMTOM_MAP = 2.4807 -NAVIGATION_VERSION = 2.5.0 +NAVIGATION_VERSION = 2.7.7 PREFERENCES_VERSION = 1.2.1 RETROFIT_VERSION = 2.9.0 OKHTTP_VERSION = 4.9.0 MOKITO_INLINE_VERSION = 2.13.0 -CORE_TEST_VERSION = 2.1.0 +CORE_TEST_VERSION = 2.2.0 MOCKK_VERSION = 1.10.5 -TEST_JUNIT_VERSION = 1.1.5 +TEST_JUNIT_VERSION = 1.2.0 TEST_RUNNER_VERSION = 1.5.2 -ESPRESSO_VERSION = 3.5.1 +ESPRESSO_VERSION = 3.6.0 HAMCREST_VERSION = 2.2 JUNIT_VERSION = 4.13.2 KODEIN_VERSION = 6.2.1 -ROOM_VERSION = 2.5.0 +ROOM_VERSION = 2.6.1 KOTLINX_COROUTINES = 1.6.1 -TEST_KTX_VERSION = 1.4.0 +TEST_KTX_VERSION = 1.6.0 +ANDROIDX_TEST = 1.6.0 +TEST_MONITOR = 1.7.0 GOOGLE_PLAY_SERVICE = 21.3.0 GOOGLE_SERVICES = 4.3.15 -ANDROID_LIBRARY = 8.0.0 -ANDROID_APPLICATION = 8.0.0 -GRADLE_PLUGIN_VERSION = 8.0.0 -KOTLIN_VERSION = 1.9.0 +GSON = 2.10.1 +GUAVA = 33.2.1-android +ANDROID_LIBRARY = 8.5.0 +ANDROID_APPLICATION = 8.5.0 +GRADLE_PLUGIN_VERSION = 8.5.0 +KOTLIN_VERSION = 2.0.0 KOTLIN_GRADLE_PLUGIN = 1.6.21 GRADLE_ANALYZE_VERSION = 1.20.0 # Android configuration -TARGET_SDK_VERSION = 33 +TARGET_SDK_VERSION = 34 MIN_SDK_VERSION = 26 # Gradle parameters diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 69f3872..e8f802c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jul 26 10:14:37 BST 2023 +#Tue Jun 25 17:02:21 BST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists