- upgrade android gradle to 8.5

- upgrade application to android 34
 - upgraded all library dependencies
This commit is contained in:
2024-06-26 14:42:04 +01:00
parent 78deab2b77
commit 7e405a5151
7 changed files with 38 additions and 32 deletions

2
.idea/kotlinc.xml generated
View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="KotlinJpsPluginSettings"> <component name="KotlinJpsPluginSettings">
<option name="version" value="1.6.0" /> <option name="version" value="2.0.0" />
</component> </component>
</project> </project>

View File

@@ -13,7 +13,7 @@ def keystorePath = System.getenv('PWD') + "/app/keystore.jks"
def keystore = file(keystorePath).exists() ? file(keystorePath) : null def keystore = file(keystorePath).exists() ? file(keystorePath) : null
android { android {
namespace 'com.appttude.h_mal.atlas_weather' namespace 'com.appttude.h_mal.atlas_weather'
compileSdk 33 compileSdk = Integer.parseInt(TARGET_SDK_VERSION)
defaultConfig { defaultConfig {
applicationId "com.appttude.h_mal.atlas_weather" applicationId "com.appttude.h_mal.atlas_weather"
minSdkVersion MIN_SDK_VERSION minSdkVersion MIN_SDK_VERSION
@@ -111,7 +111,6 @@ android {
lint { lint {
abortOnError false abortOnError false
} }
} }
dependencies { dependencies {
@@ -132,9 +131,12 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-viewmodel:$ANDROID_LIFECYCLE" implementation "androidx.lifecycle:lifecycle-viewmodel:$ANDROID_LIFECYCLE"
implementation "androidx.recyclerview:recyclerview:$RECYCLER_VIEW" implementation "androidx.recyclerview:recyclerview:$RECYCLER_VIEW"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$SWIPE_REFRESH" implementation "androidx.swiperefreshlayout:swiperefreshlayout:$SWIPE_REFRESH"
implementation 'com.google.code.gson:gson:2.8.5' implementation "com.google.code.gson:gson:$GSON"
implementation 'com.google.guava:guava:29.0-android' implementation "com.google.guava:guava:$GUAVA"
implementation 'io.reactivex.rxjava2:rxjava:2.2.0' 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 * / / * Google play services * /
implementation "com.google.android.gms:play-services-location:$GOOGLE_PLAY_SERVICE" implementation "com.google.android.gms:play-services-location:$GOOGLE_PLAY_SERVICE"
/ * Unit testing * / / * Unit testing * /
@@ -153,9 +155,9 @@ dependencies {
implementation "androidx.navigation:navigation-runtime:$NAVIGATION_VERSION" implementation "androidx.navigation:navigation-runtime:$NAVIGATION_VERSION"
implementation "androidx.navigation:navigation-ui:$NAVIGATION_VERSION" implementation "androidx.navigation:navigation-ui:$NAVIGATION_VERSION"
/ * android unit testing and espresso * / / * android unit testing and espresso * /
androidTestImplementation "androidx.test:rules:$TEST_KTX_VERSION" androidTestImplementation "androidx.test:rules:$ANDROIDX_TEST"
androidTestImplementation 'androidx.test:core:1.5.0' androidTestImplementation "androidx.test:core:$ANDROIDX_TEST"
androidTestImplementation 'androidx.test:monitor:1.6.1' androidTestImplementation "androidx.test:monitor:$TEST_MONITOR"
androidTestImplementation "androidx.test.ext:junit:$TEST_JUNIT_VERSION" androidTestImplementation "androidx.test.ext:junit:$TEST_JUNIT_VERSION"
androidTestRuntimeOnly "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN_VERSION" androidTestRuntimeOnly "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN_VERSION"
androidTestImplementation "androidx.test.espresso:espresso-core:$ESPRESSO_VERSION" androidTestImplementation "androidx.test.espresso:espresso-core:$ESPRESSO_VERSION"

View File

@@ -31,7 +31,7 @@ open class BaseTestRobot {
fun goBack() = Espresso.pressBack() fun goBack() = Espresso.pressBack()
fun fillEditText(resId: Int, text: String?): ViewInteraction = fun fillEditText(resId: Int, text: String): ViewInteraction =
onView(withId(resId)).perform( onView(withId(resId)).perform(
ViewActions.replaceText(text), ViewActions.replaceText(text),
ViewActions.closeSoftKeyboard() ViewActions.closeSoftKeyboard()

View File

@@ -13,7 +13,7 @@ fun <T> LiveData<T>.getOrAwaitValue(
var data: T? = null var data: T? = null
val latch = CountDownLatch(1) val latch = CountDownLatch(1)
val observer = object : Observer<T> { val observer = object : Observer<T> {
override fun onChanged(o: T?) { override fun onChanged(o: T) {
data = o data = o
latch.countDown() latch.countDown()
this@getOrAwaitValue.removeObserver(this) this@getOrAwaitValue.removeObserver(this)

View File

@@ -11,8 +11,8 @@ buildscript {
} }
plugins { plugins {
id 'com.android.application' version "$ANDROID_APPLICATION" apply false id 'com.android.application' version "$GRADLE_PLUGIN_VERSION" apply false
id 'com.android.library' version "$ANDROID_LIBRARY" apply false id 'com.android.library' version "$GRADLE_PLUGIN_VERSION" apply false
id 'com.google.gms.google-services' version "$GOOGLE_SERVICES" apply false id 'com.google.gms.google-services' version "$GOOGLE_SERVICES" apply false
id 'org.jetbrains.kotlin.android' version "$KOTLIN_VERSION" apply false id 'org.jetbrains.kotlin.android' version "$KOTLIN_VERSION" apply false
id 'com.autonomousapps.dependency-analysis' version "$GRADLE_ANALYZE_VERSION" id 'com.autonomousapps.dependency-analysis' version "$GRADLE_ANALYZE_VERSION"

View File

@@ -21,46 +21,50 @@ android.nonFinalResIds=false
# Plugin versions # Plugin versions
ANDROID_CORE = 1.10.1 ANDROID_CORE = 1.13.1
CUSTOM_VIEW = 1.1.0 CUSTOM_VIEW = 1.1.0
CARD_VIEW = 1.0.0 CARD_VIEW = 1.0.0
FRAGMENT_VERSION = 1.5.4 FRAGMENT_VERSION = 1.8.0
MATERIAL_VERSION = 1.8.0 MATERIAL_VERSION = 1.12.0
APP_COMPAT = 1.6.0 APP_COMPAT = 1.7.0
CONSTR_LAYOUT_VERSION = 2.1.4 CONSTR_LAYOUT_VERSION = 2.1.4
ANDROID_LIFECYCLE = 2.5.1 ANDROID_LIFECYCLE = 2.8.2
RECYCLER_VIEW = 1.1.0 RECYCLER_VIEW = 1.3.2
SWIPE_REFRESH = 1.0.0 SWIPE_REFRESH = 1.1.0
PERMISSIONS_DISPATCHER = 4.9.2 PERMISSIONS_DISPATCHER = 4.9.2
TOMTOM_SEARCH = 2.4771 TOMTOM_SEARCH = 2.4771
TOMTOM_MAP = 2.4807 TOMTOM_MAP = 2.4807
NAVIGATION_VERSION = 2.5.0 NAVIGATION_VERSION = 2.7.7
PREFERENCES_VERSION = 1.2.1 PREFERENCES_VERSION = 1.2.1
RETROFIT_VERSION = 2.9.0 RETROFIT_VERSION = 2.9.0
OKHTTP_VERSION = 4.9.0 OKHTTP_VERSION = 4.9.0
MOKITO_INLINE_VERSION = 2.13.0 MOKITO_INLINE_VERSION = 2.13.0
CORE_TEST_VERSION = 2.1.0 CORE_TEST_VERSION = 2.2.0
MOCKK_VERSION = 1.10.5 MOCKK_VERSION = 1.10.5
TEST_JUNIT_VERSION = 1.1.5 TEST_JUNIT_VERSION = 1.2.0
TEST_RUNNER_VERSION = 1.5.2 TEST_RUNNER_VERSION = 1.5.2
ESPRESSO_VERSION = 3.5.1 ESPRESSO_VERSION = 3.6.0
HAMCREST_VERSION = 2.2 HAMCREST_VERSION = 2.2
JUNIT_VERSION = 4.13.2 JUNIT_VERSION = 4.13.2
KODEIN_VERSION = 6.2.1 KODEIN_VERSION = 6.2.1
ROOM_VERSION = 2.5.0 ROOM_VERSION = 2.6.1
KOTLINX_COROUTINES = 1.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_PLAY_SERVICE = 21.3.0
GOOGLE_SERVICES = 4.3.15 GOOGLE_SERVICES = 4.3.15
ANDROID_LIBRARY = 8.0.0 GSON = 2.10.1
ANDROID_APPLICATION = 8.0.0 GUAVA = 33.2.1-android
GRADLE_PLUGIN_VERSION = 8.0.0 ANDROID_LIBRARY = 8.5.0
KOTLIN_VERSION = 1.9.0 ANDROID_APPLICATION = 8.5.0
GRADLE_PLUGIN_VERSION = 8.5.0
KOTLIN_VERSION = 2.0.0
KOTLIN_GRADLE_PLUGIN = 1.6.21 KOTLIN_GRADLE_PLUGIN = 1.6.21
GRADLE_ANALYZE_VERSION = 1.20.0 GRADLE_ANALYZE_VERSION = 1.20.0
# Android configuration # Android configuration
TARGET_SDK_VERSION = 33 TARGET_SDK_VERSION = 34
MIN_SDK_VERSION = 26 MIN_SDK_VERSION = 26
# Gradle parameters # Gradle parameters

View File

@@ -1,6 +1,6 @@
#Wed Jul 26 10:14:37 BST 2023 #Tue Jun 25 17:02:21 BST 2024
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists