diff --git a/android/buildSrc/src/main/kotlin/Dependencies.kt b/android/buildSrc/src/main/kotlin/Dependencies.kt index 0ea717a4e2ce..c68e6b417c42 100644 --- a/android/buildSrc/src/main/kotlin/Dependencies.kt +++ b/android/buildSrc/src/main/kotlin/Dependencies.kt @@ -30,14 +30,10 @@ object Dependencies { "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.AndroidX.lifecycle}" const val espressoCore = "androidx.test.espresso:espresso-core:${Versions.AndroidX.espresso}" - const val testCore = - "androidx.test:core:${Versions.AndroidX.test}" - const val testMonitor = - "androidx.test:monitor:${Versions.AndroidX.testMonitor}" - const val testRunner = - "androidx.test:runner:${Versions.AndroidX.testRunner}" - const val testRules = - "androidx.test:rules:${Versions.AndroidX.test}" + const val testCore = "androidx.test:core:${Versions.AndroidX.test}" + const val testMonitor = "androidx.test:monitor:${Versions.AndroidX.testMonitor}" + const val testRunner = "androidx.test:runner:${Versions.AndroidX.testRunner}" + const val testRules = "androidx.test:rules:${Versions.AndroidX.test}" const val testUiAutomator = "androidx.test.uiautomator:uiautomator:${Versions.AndroidX.uiautomator}" const val testOrchestrator = @@ -45,28 +41,27 @@ object Dependencies { } object Compose { + const val constrainLayout = + "androidx.constraintlayout:constraintlayout-compose:${Versions.Compose.constrainLayout}" const val destinations = "io.github.raamcosta.compose-destinations:core:${Versions.Compose.destinations}" const val destinationsKsp = "io.github.raamcosta.compose-destinations:ksp:${Versions.Compose.destinations}" - const val constrainLayout = - "androidx.constraintlayout:constraintlayout-compose:${Versions.Compose.constrainLayout}" const val foundation = "androidx.compose.foundation:foundation:${Versions.Compose.foundation}" const val junit5 = "de.mannodermaus.junit5:android-test-compose:${Versions.Android.junit}" const val material3 = "androidx.compose.material3:material3:${Versions.Compose.material3}" const val testManifest = "androidx.compose.ui:ui-test-manifest:${Versions.Compose.base}" + const val ui = "androidx.compose.ui:ui:${Versions.Compose.base}" const val uiController = "com.google.accompanist:accompanist-systemuicontroller:${Versions.Compose.uiController}" - const val ui = "androidx.compose.ui:ui:${Versions.Compose.base}" - const val uiUtil = "androidx.compose.ui:ui-util:${Versions.Compose.base}" + const val uiTestManifest = "androidx.compose.ui:ui-test-manifest:${Versions.Compose.base}" const val uiTooling = "androidx.compose.ui:ui-tooling:${Versions.Compose.base}" - const val uiToolingPreview = - "androidx.compose.ui:ui-tooling-preview:${Versions.Compose.base}" const val uiToolingAndroidPreview = "androidx.compose.ui:ui-tooling-preview-android:${Versions.Compose.base}" - const val uiTestManifest = - "androidx.compose.ui:ui-test-manifest:${Versions.Compose.base}" + const val uiToolingPreview = + "androidx.compose.ui:ui-tooling-preview:${Versions.Compose.base}" + const val uiUtil = "androidx.compose.ui:ui-util:${Versions.Compose.base}" } object Koin { @@ -122,18 +117,18 @@ object Dependencies { const val androidApplicationId = "com.android.application" const val androidLibraryId = "com.android.library" const val androidTestId = "com.android.test" - const val playPublisher = - "com.github.triplet.gradle:play-publisher:${Versions.Plugin.playPublisher}" - const val playPublisherId = "com.github.triplet.play" - const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}" - const val kotlinAndroidId = "kotlin-android" - const val kotlinParcelizeId = "kotlin-parcelize" const val dependencyCheck = "org.owasp:dependency-check-gradle:${Versions.Plugin.dependencyCheck}" const val dependencyCheckId = "org.owasp.dependencycheck" const val gradleVersionsId = "com.github.ben-manes.versions" - const val ktfmtId = "com.ncorti.ktfmt.gradle" - const val ksp = "com.google.devtools.ksp" const val junit5 = "de.mannodermaus.android-junit5" + const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}" + const val kotlinAndroidId = "kotlin-android" + const val kotlinParcelizeId = "kotlin-parcelize" + const val ksp = "com.google.devtools.ksp" + const val ktfmtId = "com.ncorti.ktfmt.gradle" + const val playPublisher = + "com.github.triplet.gradle:play-publisher:${Versions.Plugin.playPublisher}" + const val playPublisherId = "com.github.triplet.play" } } diff --git a/android/buildSrc/src/main/kotlin/Versions.kt b/android/buildSrc/src/main/kotlin/Versions.kt index 29117097b91e..dc5c5d923b22 100644 --- a/android/buildSrc/src/main/kotlin/Versions.kt +++ b/android/buildSrc/src/main/kotlin/Versions.kt @@ -15,10 +15,10 @@ object Versions { object Android { const val compileSdkVersion = 34 + const val junit = "1.4.0" const val minSdkVersion = 26 const val targetSdkVersion = 34 const val volley = "1.2.1" - const val junit = "1.4.0" } object AndroidX { @@ -53,11 +53,11 @@ object Versions { const val playPublisher = "3.8.4" const val dependencyCheck = "8.3.1" const val gradleVersions = "0.47.0" + const val junit5 = "1.10.0.0" const val ktfmt = "0.13.0" // Ksp version is linked with kotlin version, find matching release here: // https://github.com/google/ksp/releases const val ksp = "${kotlin}-1.0.14" - const val junit5 = "1.10.0.0" } object Koin { diff --git a/android/lib/billing/build.gradle.kts b/android/lib/billing/build.gradle.kts index 93b157f1a9e9..26cc345556cb 100644 --- a/android/lib/billing/build.gradle.kts +++ b/android/lib/billing/build.gradle.kts @@ -1,7 +1,7 @@ plugins { id(Dependencies.Plugin.androidLibraryId) - id(Dependencies.Plugin.kotlinAndroidId) id(Dependencies.Plugin.junit5) version Versions.Plugin.junit5 + id(Dependencies.Plugin.kotlinAndroidId) } android { @@ -56,12 +56,13 @@ dependencies { implementation(project(Dependencies.Mullvad.paymentLib)) // Test dependencies + testRuntimeOnly(Dependencies.junitEngine) + testImplementation(project(Dependencies.Mullvad.commonTestLib)) testImplementation(Dependencies.Kotlin.test) testImplementation(Dependencies.KotlinX.coroutinesTest) testImplementation(Dependencies.MockK.core) testImplementation(Dependencies.junitApi) - testRuntimeOnly(Dependencies.junitEngine) testImplementation(Dependencies.turbine) androidTestImplementation(project(Dependencies.Mullvad.commonTestLib))