From 9299b693746dd864bb4e84745b296a11f35d755d Mon Sep 17 00:00:00 2001 From: Kenneth Soh Date: Tue, 5 May 2026 19:04:34 +0800 Subject: [PATCH] feat: Bump AGP to 9.2 Sonar should be resolved --- build.gradle.kts | 1 - gradle.properties | 2 -- gradle/libs.versions.toml | 5 +---- helperlib/build.gradle.kts | 3 +-- .../itachi1706/helperlib/concurrent/ConstantsTest.kt | 2 +- .../helperlib/concurrent/CoroutineAsyncTaskTest.kt | 10 +++++----- .../helperlib/exceptions/ApiExceptionTest.kt | 2 +- .../com/itachi1706/helperlib/helpers/LogHelperTest.kt | 2 +- .../helperlib/helpers/ValidationHelperTest.kt | 2 +- .../itachi1706/helperlib/objects/ApiResponseTest.kt | 2 +- .../itachi1706/helperlib/objects/HttpRequestTest.kt | 2 +- 11 files changed, 13 insertions(+), 20 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ce96aca..4c66193 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { alias(libs.plugins.android.library) apply false - alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.serialization) apply false alias(libs.plugins.sonarqube) } diff --git a/gradle.properties b/gradle.properties index 1fb3ad5..c12ed69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,8 +15,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true -# Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 875b6c5..541d278 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,10 @@ [versions] -# Hold off AGP 9 due to https://community.sonarsource.com/t/working-towards-the-support-of-android-gradle-plugin-9/177015/6 -androidLibrary = "8.13.2" +androidLibrary = "9.2.0" appcompat = "1.7.1" coreKtx = "1.18.0" espressoCore = "3.7.0" junit = "1.3.0" junitVersion = "4.13.2" -kotlinAndroid = "2.3.21" kotlinSerialization = "2.3.21" kotlinxSerializationJson = "1.11.0" kotlinxCoroutines = "1.10.2" @@ -33,7 +31,6 @@ volley = { module = "com.android.volley:volley", version.ref = "volley" } [plugins] android-library = { id = "com.android.library", version.ref = "androidLibrary" } -kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinAndroid" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinSerialization" } sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" } diff --git a/helperlib/build.gradle.kts b/helperlib/build.gradle.kts index 5891b39..0c79b76 100644 --- a/helperlib/build.gradle.kts +++ b/helperlib/build.gradle.kts @@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { alias(libs.plugins.android.library) - alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.serialization) } @@ -77,5 +76,5 @@ dependencies { implementation(libs.volley) } -// Apply the publish.gradle file +// Apply publishing with publish.gradle file apply(from = "./publish.gradle") \ No newline at end of file diff --git a/helperlib/src/test/java/com/itachi1706/helperlib/concurrent/ConstantsTest.kt b/helperlib/src/test/java/com/itachi1706/helperlib/concurrent/ConstantsTest.kt index 225293f..0b04761 100644 --- a/helperlib/src/test/java/com/itachi1706/helperlib/concurrent/ConstantsTest.kt +++ b/helperlib/src/test/java/com/itachi1706/helperlib/concurrent/ConstantsTest.kt @@ -1,6 +1,6 @@ package com.itachi1706.helperlib.concurrent -import kotlin.test.Test +import org.junit.Test import kotlin.test.assertEquals class ConstantsTest { diff --git a/helperlib/src/test/java/com/itachi1706/helperlib/concurrent/CoroutineAsyncTaskTest.kt b/helperlib/src/test/java/com/itachi1706/helperlib/concurrent/CoroutineAsyncTaskTest.kt index b29242a..18c020f 100644 --- a/helperlib/src/test/java/com/itachi1706/helperlib/concurrent/CoroutineAsyncTaskTest.kt +++ b/helperlib/src/test/java/com/itachi1706/helperlib/concurrent/CoroutineAsyncTaskTest.kt @@ -7,12 +7,12 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking import kotlinx.coroutines.test.resetMain import kotlinx.coroutines.test.setMain +import org.junit.After +import org.junit.Before +import org.junit.Test import org.junit.runner.RunWith import org.mockito.junit.MockitoJUnitRunner import org.mockito.kotlin.spy -import kotlin.test.AfterTest -import kotlin.test.BeforeTest -import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith @@ -23,14 +23,14 @@ class CoroutineAsyncTaskTest { private val testDispatcher = Dispatchers.Unconfined @OptIn(ExperimentalCoroutinesApi::class) - @BeforeTest + @Before fun setup() { Dispatchers.setMain(testDispatcher) task = spy(TestCoroutineAsyncTask()) } @OptIn(ExperimentalCoroutinesApi::class) - @AfterTest + @After fun tearDown() { Dispatchers.resetMain() } diff --git a/helperlib/src/test/java/com/itachi1706/helperlib/exceptions/ApiExceptionTest.kt b/helperlib/src/test/java/com/itachi1706/helperlib/exceptions/ApiExceptionTest.kt index d6a495c..343e028 100644 --- a/helperlib/src/test/java/com/itachi1706/helperlib/exceptions/ApiExceptionTest.kt +++ b/helperlib/src/test/java/com/itachi1706/helperlib/exceptions/ApiExceptionTest.kt @@ -1,6 +1,6 @@ package com.itachi1706.helperlib.exceptions -import kotlin.test.Test +import org.junit.Test import kotlin.test.assertEquals import kotlin.test.assertNull diff --git a/helperlib/src/test/java/com/itachi1706/helperlib/helpers/LogHelperTest.kt b/helperlib/src/test/java/com/itachi1706/helperlib/helpers/LogHelperTest.kt index 8decb92..1cd8af9 100644 --- a/helperlib/src/test/java/com/itachi1706/helperlib/helpers/LogHelperTest.kt +++ b/helperlib/src/test/java/com/itachi1706/helperlib/helpers/LogHelperTest.kt @@ -1,9 +1,9 @@ package com.itachi1706.helperlib.helpers import com.itachi1706.helperlib.interfaces.LogHandler +import org.junit.Test import org.mockito.kotlin.mock import org.mockito.kotlin.verify -import kotlin.test.Test import kotlin.test.assertEquals class LogHelperTest { diff --git a/helperlib/src/test/java/com/itachi1706/helperlib/helpers/ValidationHelperTest.kt b/helperlib/src/test/java/com/itachi1706/helperlib/helpers/ValidationHelperTest.kt index 860b134..db31b7e 100644 --- a/helperlib/src/test/java/com/itachi1706/helperlib/helpers/ValidationHelperTest.kt +++ b/helperlib/src/test/java/com/itachi1706/helperlib/helpers/ValidationHelperTest.kt @@ -1,6 +1,6 @@ package com.itachi1706.helperlib.helpers -import kotlin.test.Test +import org.junit.Test import kotlin.test.assertEquals class ValidationHelperTest { diff --git a/helperlib/src/test/java/com/itachi1706/helperlib/objects/ApiResponseTest.kt b/helperlib/src/test/java/com/itachi1706/helperlib/objects/ApiResponseTest.kt index 3dfd898..85092ee 100644 --- a/helperlib/src/test/java/com/itachi1706/helperlib/objects/ApiResponseTest.kt +++ b/helperlib/src/test/java/com/itachi1706/helperlib/objects/ApiResponseTest.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonPrimitive import kotlinx.serialization.json.buildJsonObject import kotlinx.serialization.json.put -import kotlin.test.Test +import org.junit.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertNotNull diff --git a/helperlib/src/test/java/com/itachi1706/helperlib/objects/HttpRequestTest.kt b/helperlib/src/test/java/com/itachi1706/helperlib/objects/HttpRequestTest.kt index 899db51..f647b56 100644 --- a/helperlib/src/test/java/com/itachi1706/helperlib/objects/HttpRequestTest.kt +++ b/helperlib/src/test/java/com/itachi1706/helperlib/objects/HttpRequestTest.kt @@ -1,7 +1,7 @@ package com.itachi1706.helperlib.objects import com.android.volley.Request -import kotlin.test.Test +import org.junit.Test import kotlin.test.assertEquals class HttpRequestTest {