From ac42acf05a27eafb57ab4c4094d4a5aac63e3515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20G=C3=B3mez?= Date: Fri, 27 Feb 2026 19:11:36 +0100 Subject: [PATCH 1/5] update to develocity --- settings.gradle.kts | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 45424875..61bad881 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -13,13 +13,16 @@ pluginManagement { gradlePluginPortal() google() mavenCentral() - mavenLocal() + // Avoid mavenLocal in CI to keep builds reproducible + if (!providers.environmentVariable("CI").isPresent) mavenLocal() } } dependencyResolutionManagement { versionCatalogs { - create("libs") { from(files("./gradle/libraries.versions.toml")) } + create("libs") { + from(files("gradle/libraries.versions.toml")) + } } /** * The dependencyResolutionManagement { repositories {...}} @@ -36,24 +39,33 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - mavenLocal() - maven("https://jitpack.io") - maven("https://oss.sonatype.org/content/repositories/snapshots/") - maven(url = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/") + // Avoid mavenLocal in CI to keep builds reproducible + if (!providers.environmentVariable("CI").isPresent) mavenLocal() + + // JitPack only for com.github.* coordinates + exclusiveContent { + forRepository { maven("https://jitpack.io") } + filter { includeGroupByRegex("com\\.github\\..*") } + } + + // Snapshots repo only for snapshot versions + maven("https://oss.sonatype.org/content/repositories/snapshots/") { + mavenContent { snapshotsOnly() } + } } } plugins { - id("com.gradle.enterprise") version "3.15.1" + id("com.gradle.develocity") version "4.3.2" } -gradleEnterprise { +develocity { buildScan { - termsOfServiceUrl = "https://gradle.com/terms-of-service" - termsOfServiceAgree = "yes" + termsOfUseUrl = "https://gradle.com/terms-of-service" + termsOfUseAgree = "yes" // Publishing a build scan for every build execution - publishAlways() + publishing.onlyIf { providers.environmentVariable("CI").isPresent } } } From 857949c8766e3c9c6b2f1e96e386f3be3216102e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20G=C3=B3mez?= Date: Wed, 4 Mar 2026 15:14:08 +0100 Subject: [PATCH 2/5] extract kotlin y java toolchain outside of android --- .../android-application-conventions.gradle.kts | 14 ++++++++------ .../android-library-conventions.gradle.kts | 16 ++++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/android-application-conventions.gradle.kts b/build-logic/convention/src/main/kotlin/android-application-conventions.gradle.kts index 4a04dab2..59b6ec5a 100644 --- a/build-logic/convention/src/main/kotlin/android-application-conventions.gradle.kts +++ b/build-logic/convention/src/main/kotlin/android-application-conventions.gradle.kts @@ -78,12 +78,14 @@ android { excludes.add("META-INF/*.kotlin_module") } } +} - project.kotlin { - jvmToolchain(jdkVersion = libs.versions.jdk.asInt()) - } +kotlin { + jvmToolchain(jdkVersion = libs.versions.jdk.asInt()) +} - kotlinOptions { - jvmTarget = libs.versions.jdk.toString() +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(libs.versions.jdk.asInt())) } -} +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts b/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts index 66118082..e30ec4a7 100644 --- a/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts +++ b/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts @@ -1,5 +1,7 @@ import extension.libs import extension.versions +import gradle.kotlin.dsl.accessors._8e8a6dd48b2094ffcd3758431423791d.java +import gradle.kotlin.dsl.accessors._8e8a6dd48b2094ffcd3758431423791d.kotlin plugins { id("com.android.library") @@ -40,12 +42,14 @@ android { // excludes.add("META-INF/*.kotlin_module") } } +} - project.kotlin { - jvmToolchain(jdkVersion = libs.versions.jdk.asInt()) - } +kotlin { + jvmToolchain(jdkVersion = libs.versions.jdk.asInt()) +} - kotlinOptions { - jvmTarget = libs.versions.jdk.toString() +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(libs.versions.jdk.asInt())) } -} +} \ No newline at end of file From ce20acf18f0108347e449a62a79dfc57905bdf45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20G=C3=B3mez?= Date: Wed, 4 Mar 2026 15:55:53 +0100 Subject: [PATCH 3/5] update agp to "8.13.2" --- .../android-library-conventions.gradle.kts | 2 - build-logic/gradle.properties | 11 +- build-logic/gradle/libraries.versions.toml | 117 ++++++++---------- .../gradle/wrapper/gradle-wrapper.properties | 2 +- gradle/libraries.versions.toml | 116 ++++++++--------- gradle/wrapper/gradle-wrapper.properties | 2 +- libraries/android-binding/build.gradle.kts | 2 +- libraries/android-compose/build.gradle.kts | 2 +- libraries/android-test/build.gradle.kts | 2 +- libraries/android/build.gradle.kts | 2 +- libraries/core/build.gradle.kts | 2 +- libraries/coroutines-test/build.gradle.kts | 2 +- libraries/coroutines/build.gradle.kts | 2 +- libraries/network/build.gradle.kts | 2 +- libraries/pagination-co/build.gradle.kts | 2 +- libraries/pagination/build.gradle.kts | 2 +- libraries/permissions/build.gradle.kts | 2 +- libraries/preferences/build.gradle.kts | 2 +- libraries/threeten-test/build.gradle.kts | 2 +- libraries/threeten/build.gradle.kts | 2 +- 20 files changed, 133 insertions(+), 145 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts b/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts index e30ec4a7..ab62cb07 100644 --- a/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts +++ b/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts @@ -1,7 +1,5 @@ import extension.libs import extension.versions -import gradle.kotlin.dsl.accessors._8e8a6dd48b2094ffcd3758431423791d.java -import gradle.kotlin.dsl.accessors._8e8a6dd48b2094ffcd3758431423791d.kotlin plugins { id("com.android.library") diff --git a/build-logic/gradle.properties b/build-logic/gradle.properties index 1c9073eb..b343b7c1 100644 --- a/build-logic/gradle.properties +++ b/build-logic/gradle.properties @@ -1,4 +1,9 @@ # Gradle properties are not passed to included builds https://github.com/gradle/gradle/issues/2534 -org.gradle.parallel=true -org.gradle.caching=true -org.gradle.configureondemand=true +#org.gradle.parallel=true +#org.gradle.caching=true +#org.gradle.configureondemand=true + +# Volver a activar cuando se actualice gradle o kotlin +org.gradle.parallel=false +org.gradle.configureondemand=false +org.gradle.configuration-cache=false \ No newline at end of file diff --git a/build-logic/gradle/libraries.versions.toml b/build-logic/gradle/libraries.versions.toml index b4ce97f7..4c44c4ae 100644 --- a/build-logic/gradle/libraries.versions.toml +++ b/build-logic/gradle/libraries.versions.toml @@ -7,6 +7,10 @@ compileSdk = "34" sourceCompatibility = "17" targetCompatibility = "17" +agp = "8.13.2" +kotlin = "2.0.21" +ksp = "2.0.21-1.0.27" + androidx-core-ktx = "1.13.1" androidx-activity-ktx = "1.9.3" androidx-fragment-ktx = "1.8.4" @@ -34,9 +38,8 @@ androidx-startup = "1.2.0" androidx-workmanager = "2.9.1" androidx-workmanager-hilt = "1.2.0" android-material = "1.12.0" -android-play-core = "1.10.3" -android-versioning = "0.56.4" -android-publish-library = "0.56.4" +android-versioning = "0.57.16" +android-publish-library = "0.57.16" accompanist = "0.30.1" benManes = "0.46.0" coil = "2.7.0" @@ -64,21 +67,18 @@ detekt = "1.22.0" firebase = "33.5.1" firebase-appdistribution = "5.0.0" firebase-crashlytics = "3.0.2" -gradle-plugin = "8.7.1" gradle-play-publisher = "3.8.4" gradle-secrets = "2.0.1" glide = "4.13.2" gander = "3.1.0" gson = "2.10.1" hilt = "2.52" -ksp = "2.0.21-1.0.27" json = "20230227" landscapist = "2.4.1" leakcanary = "2.12" -kotlin = "2.0.21" mockk = "1.13.12" network-response-adapter = "5.0.0" -nexus-publish = "1.3.0" +nmcp = "1.4.4" okhttp3 = "4.12.0" okhttp-mockwebserver = "2.7.5" play-services = "4.4.2" @@ -143,7 +143,6 @@ androidx-work-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version. androidx-work-test = { module = "androidx.work:work-testing", version.ref = "androidx-workmanager" } android-material = { module = "com.google.android.material:material", version.ref = "android-material" } -android-play-core = { module = "com.google.android.play:core", version.ref = "android-play-core" } accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanist" } accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" } @@ -160,13 +159,9 @@ commons-core = { module = "com.raxdenstudios:commons-core", version.ref = "commo commons-coroutines = { module = "com.raxdenstudios:commons-coroutines", version.ref = "commons-coroutines" } commons-coroutines-test = { module = "com.raxdenstudios:commons-coroutines-test", version.ref = "commons-coroutines-test" } commons-network = { module = "com.raxdenstudios:commons-network", version.ref = "commons-network" } -commons-network-rx = { module = "com.raxdenstudios:commons-network-rx", version.ref = "commons-network-rx" } commons-pagination-co = { module = "com.raxdenstudios:commons-pagination-co", version.ref = "commons-pagination-co" } -commons-pagination-rx = { module = "com.raxdenstudios:commons-pagination-rx", version.ref = "commons-pagination-rx" } commons-permissions = { module = "com.raxdenstudios:commons-permissions", version.ref = "commons-permissions" } commons-preferences = { module = "com.raxdenstudios:commons-preferences", version.ref = "commons-preferences" } -commons-rx = { module = "com.raxdenstudios:commons-rx", version.ref = "commons-rx" } -commons-rx-test = { module = "com.raxdenstudios:commons-rx-test", version.ref = "commons-rx-test" } commons-threetenabp = { module = "com.raxdenstudios:commons-threeten", version.ref = "commons-threeten" } commons-threetenabp-test = { module = "com.raxdenstudios:commons-threeten-test", version.ref = "commons-threeten-test" } @@ -186,9 +181,6 @@ firebase-messaging = { module = "com.google.firebase:firebase-messaging-ktx" } gander-debug = { module = "com.ashokvarma.android:gander-imdb", version.ref = "gander" } gander-release = { module = "com.ashokvarma.android:gander-no-op", version.ref = "gander" } -glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } -glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" } - gson = { module = "com.google.code.gson:gson", version.ref = "gson" } hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } @@ -238,7 +230,7 @@ truth = { module = "com.google.truth:truth", version.ref = "truth" } turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" } # Dependencies of the included build-logic -android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "gradle-plugin" } +android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "agp" } kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } kotlin-compose-gradlePlugin = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" } kotlin-serialization-gradlePlugin = { module = "org.jetbrains.kotlin.plugin.serialization:org.jetbrains.kotlin.plugin.serialization.gradle.plugin", version.ref = "kotlin" } @@ -246,11 +238,56 @@ rootcoverage-gradlePlugin = { module = "nl.neotech.plugin.rootcoverage:nl.neotec detekt-gradlePlugin = { module = "io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin", version.ref = "detekt" } ksp-gradlePlugin = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } +[plugins] + +android-application = { id = "com.android.application", version.ref = "agp" } +android-library = { id = "com.android.library", version.ref = "agp" } + +firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } +firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } +hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } +play-services = { id = "com.google.gms.google-services", version.ref = "play-services" } +gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "gradle-secrets" } + +android-versioning = { id = "com.raxdenstudios.android-versioning", version.ref = "android-versioning" } +android-publish-library = { id = "com.raxdenstudios.android-publish-library", version.ref = "android-publish-library" } + +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } + +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } + +detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } +detekt-formatting = { id = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" } + +rootcoverage = { id = "nl.neotech.plugin.rootcoverage", version.ref = "rootcoverage" } + +nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" } +nmcp = { id = "com.gradleup.nmcp", version.ref = "nmcp" } + +gradle-play-publisher = { id = "com.github.triplet.play", version.ref = "gradle-play-publisher" } + +test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" } + +benManes = { id = "com.github.ben-manes.versions", version.ref = "benManes" } +versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdate" } + +# Plugins defined by this project +android-application-conventions = { id = "android-application-conventions" } +android-compose-application-conventions = { id = "android-compose-application-conventions" } +android-compose-feature-conventions = { id = "android-compose-feature-conventions" } +android-compose-library-conventions = { id = "android-compose-library-conventions" } +android-feature-conventions = { id = "android-feature-conventions" } +android-library-conventions = { id = "android-library-conventions" } +android-project-conventions = { id = "android-project-conventions" } + + [bundles] android-material = [ "android-material", - "android-play-core", "timber", ] android-compose = [ @@ -384,48 +421,4 @@ test-espresso = [ test-mockwebserver = [ "restmock", "okhttp-mockwebserver", -] - -[plugins] - -android-application = { id = "com.android.application", version.ref = "gradle-plugin" } -android-library = { id = "com.android.library", version.ref = "gradle-plugin" } - -firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } -firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } -hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } -play-services = { id = "com.google.gms.google-services", version.ref = "play-services" } -gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "gradle-secrets" } - -android-versioning = { id = "com.raxdenstudios.android-versioning", version.ref = "android-versioning" } -android-publish-library = { id = "com.raxdenstudios.android-publish-library", version.ref = "android-publish-library" } - -kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } -kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } -kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } - -ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } - -detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } -detekt-formatting = { id = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" } - -rootcoverage = { id = "nl.neotech.plugin.rootcoverage", version.ref = "rootcoverage" } - -nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus-publish" } - -gradle-play-publisher = { id = "com.github.triplet.play", version.ref = "gradle-play-publisher" } - -test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" } - -benManes = { id = "com.github.ben-manes.versions", version.ref = "benManes" } -versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdate" } - -# Plugins defined by this project -android-application-conventions = { id = "android-application-conventions" } -android-compose-application-conventions = { id = "android-compose-application-conventions" } -android-compose-feature-conventions = { id = "android-compose-feature-conventions" } -android-compose-library-conventions = { id = "android-compose-library-conventions" } -android-feature-conventions = { id = "android-feature-conventions" } -android-library-conventions = { id = "android-library-conventions" } -android-project-conventions = { id = "android-project-conventions" } +] \ No newline at end of file diff --git a/build-logic/gradle/wrapper/gradle-wrapper.properties b/build-logic/gradle/wrapper/gradle-wrapper.properties index 18330fcb..29a0dd9a 100644 --- a/build-logic/gradle/wrapper/gradle-wrapper.properties +++ b/build-logic/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradle/libraries.versions.toml b/gradle/libraries.versions.toml index 78efc5e5..4c44c4ae 100644 --- a/gradle/libraries.versions.toml +++ b/gradle/libraries.versions.toml @@ -7,6 +7,10 @@ compileSdk = "34" sourceCompatibility = "17" targetCompatibility = "17" +agp = "8.13.2" +kotlin = "2.0.21" +ksp = "2.0.21-1.0.27" + androidx-core-ktx = "1.13.1" androidx-activity-ktx = "1.9.3" androidx-fragment-ktx = "1.8.4" @@ -34,9 +38,8 @@ androidx-startup = "1.2.0" androidx-workmanager = "2.9.1" androidx-workmanager-hilt = "1.2.0" android-material = "1.12.0" -android-play-core = "1.10.3" -android-versioning = "0.56.4" -android-publish-library = "0.56.4" +android-versioning = "0.57.16" +android-publish-library = "0.57.16" accompanist = "0.30.1" benManes = "0.46.0" coil = "2.7.0" @@ -64,18 +67,15 @@ detekt = "1.22.0" firebase = "33.5.1" firebase-appdistribution = "5.0.0" firebase-crashlytics = "3.0.2" -gradle-plugin = "8.7.1" gradle-play-publisher = "3.8.4" gradle-secrets = "2.0.1" glide = "4.13.2" gander = "3.1.0" gson = "2.10.1" hilt = "2.52" -ksp = "2.0.21-1.0.27" json = "20230227" landscapist = "2.4.1" leakcanary = "2.12" -kotlin = "2.0.21" mockk = "1.13.12" network-response-adapter = "5.0.0" nmcp = "1.4.4" @@ -143,7 +143,6 @@ androidx-work-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version. androidx-work-test = { module = "androidx.work:work-testing", version.ref = "androidx-workmanager" } android-material = { module = "com.google.android.material:material", version.ref = "android-material" } -android-play-core = { module = "com.google.android.play:core", version.ref = "android-play-core" } accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanist" } accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" } @@ -160,13 +159,9 @@ commons-core = { module = "com.raxdenstudios:commons-core", version.ref = "commo commons-coroutines = { module = "com.raxdenstudios:commons-coroutines", version.ref = "commons-coroutines" } commons-coroutines-test = { module = "com.raxdenstudios:commons-coroutines-test", version.ref = "commons-coroutines-test" } commons-network = { module = "com.raxdenstudios:commons-network", version.ref = "commons-network" } -commons-network-rx = { module = "com.raxdenstudios:commons-network-rx", version.ref = "commons-network-rx" } commons-pagination-co = { module = "com.raxdenstudios:commons-pagination-co", version.ref = "commons-pagination-co" } -commons-pagination-rx = { module = "com.raxdenstudios:commons-pagination-rx", version.ref = "commons-pagination-rx" } commons-permissions = { module = "com.raxdenstudios:commons-permissions", version.ref = "commons-permissions" } commons-preferences = { module = "com.raxdenstudios:commons-preferences", version.ref = "commons-preferences" } -commons-rx = { module = "com.raxdenstudios:commons-rx", version.ref = "commons-rx" } -commons-rx-test = { module = "com.raxdenstudios:commons-rx-test", version.ref = "commons-rx-test" } commons-threetenabp = { module = "com.raxdenstudios:commons-threeten", version.ref = "commons-threeten" } commons-threetenabp-test = { module = "com.raxdenstudios:commons-threeten-test", version.ref = "commons-threeten-test" } @@ -186,9 +181,6 @@ firebase-messaging = { module = "com.google.firebase:firebase-messaging-ktx" } gander-debug = { module = "com.ashokvarma.android:gander-imdb", version.ref = "gander" } gander-release = { module = "com.ashokvarma.android:gander-no-op", version.ref = "gander" } -glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } -glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" } - gson = { module = "com.google.code.gson:gson", version.ref = "gson" } hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } @@ -238,7 +230,7 @@ truth = { module = "com.google.truth:truth", version.ref = "truth" } turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" } # Dependencies of the included build-logic -android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "gradle-plugin" } +android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "agp" } kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } kotlin-compose-gradlePlugin = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" } kotlin-serialization-gradlePlugin = { module = "org.jetbrains.kotlin.plugin.serialization:org.jetbrains.kotlin.plugin.serialization.gradle.plugin", version.ref = "kotlin" } @@ -246,11 +238,56 @@ rootcoverage-gradlePlugin = { module = "nl.neotech.plugin.rootcoverage:nl.neotec detekt-gradlePlugin = { module = "io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin", version.ref = "detekt" } ksp-gradlePlugin = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } +[plugins] + +android-application = { id = "com.android.application", version.ref = "agp" } +android-library = { id = "com.android.library", version.ref = "agp" } + +firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } +firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } +hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } +play-services = { id = "com.google.gms.google-services", version.ref = "play-services" } +gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "gradle-secrets" } + +android-versioning = { id = "com.raxdenstudios.android-versioning", version.ref = "android-versioning" } +android-publish-library = { id = "com.raxdenstudios.android-publish-library", version.ref = "android-publish-library" } + +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } + +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } + +detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } +detekt-formatting = { id = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" } + +rootcoverage = { id = "nl.neotech.plugin.rootcoverage", version.ref = "rootcoverage" } + +nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" } +nmcp = { id = "com.gradleup.nmcp", version.ref = "nmcp" } + +gradle-play-publisher = { id = "com.github.triplet.play", version.ref = "gradle-play-publisher" } + +test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" } + +benManes = { id = "com.github.ben-manes.versions", version.ref = "benManes" } +versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdate" } + +# Plugins defined by this project +android-application-conventions = { id = "android-application-conventions" } +android-compose-application-conventions = { id = "android-compose-application-conventions" } +android-compose-feature-conventions = { id = "android-compose-feature-conventions" } +android-compose-library-conventions = { id = "android-compose-library-conventions" } +android-feature-conventions = { id = "android-feature-conventions" } +android-library-conventions = { id = "android-library-conventions" } +android-project-conventions = { id = "android-project-conventions" } + + [bundles] android-material = [ "android-material", - "android-play-core", "timber", ] android-compose = [ @@ -384,49 +421,4 @@ test-espresso = [ test-mockwebserver = [ "restmock", "okhttp-mockwebserver", -] - -[plugins] - -android-application = { id = "com.android.application", version.ref = "gradle-plugin" } -android-library = { id = "com.android.library", version.ref = "gradle-plugin" } - -firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } -firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } -hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } -play-services = { id = "com.google.gms.google-services", version.ref = "play-services" } -gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "gradle-secrets" } - -android-versioning = { id = "com.raxdenstudios.android-versioning", version.ref = "android-versioning" } -android-publish-library = { id = "com.raxdenstudios.android-publish-library", version.ref = "android-publish-library" } - -kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } -kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } -kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } - -ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } - -detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } -detekt-formatting = { id = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" } - -rootcoverage = { id = "nl.neotech.plugin.rootcoverage", version.ref = "rootcoverage" } - -nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" } -nmcp = { id = "com.gradleup.nmcp", version.ref = "nmcp" } - -gradle-play-publisher = { id = "com.github.triplet.play", version.ref = "gradle-play-publisher" } - -test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" } - -benManes = { id = "com.github.ben-manes.versions", version.ref = "benManes" } -versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdate" } - -# Plugins defined by this project -android-application-conventions = { id = "android-application-conventions" } -android-compose-application-conventions = { id = "android-compose-application-conventions" } -android-compose-feature-conventions = { id = "android-compose-feature-conventions" } -android-compose-library-conventions = { id = "android-compose-library-conventions" } -android-feature-conventions = { id = "android-feature-conventions" } -android-library-conventions = { id = "android-library-conventions" } -android-project-conventions = { id = "android-project-conventions" } +] \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 36074adc..a3a17a86 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-all.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libraries/android-binding/build.gradle.kts b/libraries/android-binding/build.gradle.kts index d4e3485d..449d7d73 100644 --- a/libraries/android-binding/build.gradle.kts +++ b/libraries/android-binding/build.gradle.kts @@ -12,7 +12,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/android-compose/build.gradle.kts b/libraries/android-compose/build.gradle.kts index 5f7eb30d..d0d70a2d 100644 --- a/libraries/android-compose/build.gradle.kts +++ b/libraries/android-compose/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/android-test/build.gradle.kts b/libraries/android-test/build.gradle.kts index f7dc365b..402b5270 100644 --- a/libraries/android-test/build.gradle.kts +++ b/libraries/android-test/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/android/build.gradle.kts b/libraries/android/build.gradle.kts index a0c7c1be..edcb7d7b 100644 --- a/libraries/android/build.gradle.kts +++ b/libraries/android/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/core/build.gradle.kts b/libraries/core/build.gradle.kts index b6bb0dea..a835920d 100644 --- a/libraries/core/build.gradle.kts +++ b/libraries/core/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/coroutines-test/build.gradle.kts b/libraries/coroutines-test/build.gradle.kts index cee0f36e..3aa7ee6a 100644 --- a/libraries/coroutines-test/build.gradle.kts +++ b/libraries/coroutines-test/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/coroutines/build.gradle.kts b/libraries/coroutines/build.gradle.kts index 393629be..9c0e58f0 100644 --- a/libraries/coroutines/build.gradle.kts +++ b/libraries/coroutines/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/network/build.gradle.kts b/libraries/network/build.gradle.kts index a782ef3b..1918779b 100644 --- a/libraries/network/build.gradle.kts +++ b/libraries/network/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/pagination-co/build.gradle.kts b/libraries/pagination-co/build.gradle.kts index bf6578fe..b8dbaf86 100644 --- a/libraries/pagination-co/build.gradle.kts +++ b/libraries/pagination-co/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/pagination/build.gradle.kts b/libraries/pagination/build.gradle.kts index 8772cc18..a8c6f5ae 100644 --- a/libraries/pagination/build.gradle.kts +++ b/libraries/pagination/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/permissions/build.gradle.kts b/libraries/permissions/build.gradle.kts index 7e5d97b1..ca1daa78 100644 --- a/libraries/permissions/build.gradle.kts +++ b/libraries/permissions/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/preferences/build.gradle.kts b/libraries/preferences/build.gradle.kts index 76c12b61..2613b7bd 100644 --- a/libraries/preferences/build.gradle.kts +++ b/libraries/preferences/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/threeten-test/build.gradle.kts b/libraries/threeten-test/build.gradle.kts index 0548d5d3..39ae2c47 100644 --- a/libraries/threeten-test/build.gradle.kts +++ b/libraries/threeten-test/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { diff --git a/libraries/threeten/build.gradle.kts b/libraries/threeten/build.gradle.kts index cbce2916..766e0a56 100644 --- a/libraries/threeten/build.gradle.kts +++ b/libraries/threeten/build.gradle.kts @@ -11,7 +11,7 @@ android { } versioning { - filePath = "./libraries/$name/version.properties" + filePath = "version.properties" } publishLibrary { From 1e8f3f416e046289659304165dd6885955453fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20G=C3=B3mez?= Date: Wed, 4 Mar 2026 16:01:36 +0100 Subject: [PATCH 4/5] update kotlin to "2.3.10" --- build-logic/gradle/libraries.versions.toml | 4 ++-- gradle/libraries.versions.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-logic/gradle/libraries.versions.toml b/build-logic/gradle/libraries.versions.toml index 4c44c4ae..d97a9d66 100644 --- a/build-logic/gradle/libraries.versions.toml +++ b/build-logic/gradle/libraries.versions.toml @@ -8,8 +8,8 @@ sourceCompatibility = "17" targetCompatibility = "17" agp = "8.13.2" -kotlin = "2.0.21" -ksp = "2.0.21-1.0.27" +kotlin = "2.3.10" +ksp = "2.3.6" androidx-core-ktx = "1.13.1" androidx-activity-ktx = "1.9.3" diff --git a/gradle/libraries.versions.toml b/gradle/libraries.versions.toml index 4c44c4ae..d97a9d66 100644 --- a/gradle/libraries.versions.toml +++ b/gradle/libraries.versions.toml @@ -8,8 +8,8 @@ sourceCompatibility = "17" targetCompatibility = "17" agp = "8.13.2" -kotlin = "2.0.21" -ksp = "2.0.21-1.0.27" +kotlin = "2.3.10" +ksp = "2.3.6" androidx-core-ktx = "1.13.1" androidx-activity-ktx = "1.9.3" From 2e87962be8ff5395536e1c255077e526313e1f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20G=C3=B3mez?= Date: Wed, 4 Mar 2026 16:30:45 +0100 Subject: [PATCH 5/5] update gradle to 9.1.0 --- .github/actions/checkstyle/action.yml | 10 +- ...android-application-conventions.gradle.kts | 1 - .../android-library-conventions.gradle.kts | 7 +- .../android-project-conventions.gradle.kts | 26 +- .../main/kotlin/extension/CommonExtension.kt | 37 +- build-logic/gradle/libraries.versions.toml | 479 +++++++++++------- .../gradle/wrapper/gradle-wrapper.properties | 2 +- build.gradle.kts | 6 + gradle/libraries.versions.toml | 479 +++++++++++------- gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/property/FragmentByIdDelegate.kt | 4 +- .../raxdenstudios/commons/android/util/SDK.kt | 8 +- .../permissions/model/RationaleDialog.kt | 8 +- 13 files changed, 648 insertions(+), 421 deletions(-) diff --git a/.github/actions/checkstyle/action.yml b/.github/actions/checkstyle/action.yml index 84ceafff..b5ac8dda 100644 --- a/.github/actions/checkstyle/action.yml +++ b/.github/actions/checkstyle/action.yml @@ -25,11 +25,11 @@ inputs: runs: using: 'composite' steps: - - name: Detekt - shell: bash - run: | - set -euo pipefail - ./gradlew detekt --stacktrace ${{ inputs.gradle-args }} +# - name: Detekt +# shell: bash +# run: | +# set -euo pipefail +# ./gradlew detekt --stacktrace ${{ inputs.gradle-args }} - name: Upload Detekt reports id: upload_reports diff --git a/build-logic/convention/src/main/kotlin/android-application-conventions.gradle.kts b/build-logic/convention/src/main/kotlin/android-application-conventions.gradle.kts index 59b6ec5a..4c5b0ecc 100644 --- a/build-logic/convention/src/main/kotlin/android-application-conventions.gradle.kts +++ b/build-logic/convention/src/main/kotlin/android-application-conventions.gradle.kts @@ -4,7 +4,6 @@ import extension.versions plugins { id("com.android.application") - id("kotlin-android") id("com.google.devtools.ksp") id("kotlin-parcelize") } diff --git a/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts b/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts index ab62cb07..77c34e5e 100644 --- a/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts +++ b/build-logic/convention/src/main/kotlin/android-library-conventions.gradle.kts @@ -3,7 +3,6 @@ import extension.versions plugins { id("com.android.library") - id("kotlin-android") id("com.google.devtools.ksp") id("kotlin-parcelize") } @@ -19,7 +18,11 @@ android { defaultConfig { minSdk = libs.versions.minSdk - targetSdk = libs.versions.targetSdk // needed for instrumental tests + } + + testOptions { + // used for instrumental tests + targetSdk = libs.versions.targetSdk } buildTypes { diff --git a/build-logic/convention/src/main/kotlin/android-project-conventions.gradle.kts b/build-logic/convention/src/main/kotlin/android-project-conventions.gradle.kts index 5bab74aa..09d69cf7 100644 --- a/build-logic/convention/src/main/kotlin/android-project-conventions.gradle.kts +++ b/build-logic/convention/src/main/kotlin/android-project-conventions.gradle.kts @@ -3,7 +3,7 @@ import task.DownloadGradleDependencies plugins { id("nl.neotech.plugin.rootcoverage") - id("io.gitlab.arturbosch.detekt") +// id("dev.detekt") } // Detekt info -> @@ -12,16 +12,16 @@ plugins { // ./gradlew detektBaseline - Similar to detekt, but creates a code smell baseline. Further detekt runs will // only feature new smells not in this list. // More info -> https://detekt.dev/docs/gettingstarted/gradle/ -detekt { - // version found will be used. Override to stay on the same version. - config = files("/config/detekt/detekt.yml") - // Builds the AST in parallel. Rules are always executed in parallel. Can lead to speedups in larger projects. - parallel = true - // Android: Don't create tasks for the specified build types (e.g. "release") - ignoredBuildTypes = listOf("release") - // Specify the base path for file paths in the formatted reports. - basePath = rootProject.projectDir.toString() -} +//detekt { +// // version found will be used. Override to stay on the same version. +// config = files("/config/detekt/detekt.yml") +// // Builds the AST in parallel. Rules are always executed in parallel. Can lead to speedups in larger projects. +// parallel = true +// // Android: Don't create tasks for the specified build types (e.g. "release") +// ignoredBuildTypes = listOf("release") +// // Specify the base path for file paths in the formatted reports. +// basePath = rootProject.projectDir.toString() +//} rootCoverage { // The default build variant for every module @@ -64,14 +64,14 @@ rootCoverage { } subprojects { - apply(plugin = "io.gitlab.arturbosch.detekt") +// apply(plugin = "dev.detekt") // https://docs.gradle.org/current/userguide/project_report_plugin.html#sec:project_reports_tasks apply(plugin = "project-report") dependencies { // This rule set provides wrappers for rules implemented by ktlint - https://ktlint.github.io/. // https://detekt.dev/docs/rules/formatting/dawd - detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0") +// detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0") } } diff --git a/build-logic/convention/src/main/kotlin/extension/CommonExtension.kt b/build-logic/convention/src/main/kotlin/extension/CommonExtension.kt index b0261a72..2addeaed 100644 --- a/build-logic/convention/src/main/kotlin/extension/CommonExtension.kt +++ b/build-logic/convention/src/main/kotlin/extension/CommonExtension.kt @@ -1,6 +1,5 @@ package extension -import com.android.build.api.dsl.CommonExtension import org.gradle.api.Project import org.gradle.api.plugins.ExtensionAware import org.jetbrains.kotlin.gradle.plugin.KaptExtension @@ -23,24 +22,24 @@ internal fun Project.getSigningConfigProperties(buildType: String): Properties { } -fun CommonExtension<*, *, *, *, *, *>.roomSetup( - project: Project -) { - val schemasPath = "${project.projectDir}/schemas" - defaultConfig { - project.kapt { - arguments { - arg("room.schemaLocation", schemasPath) - } - } - } - sourceSets { - // Adds exported schema location as test app assets. - getByName("debug") - .assets - .srcDirs(project.files(schemasPath)) - } -} +//fun CommonExtension<*, *, *, *, *, *>.roomSetup( +// project: Project +//) { +// val schemasPath = "${project.projectDir}/schemas" +// defaultConfig { +// project.kapt { +// arguments { +// arg("room.schemaLocation", schemasPath) +// } +// } +// } +// sourceSets { +// // Adds exported schema location as test app assets. +// getByName("debug") +// .assets +// .srcDirs(project.files(schemasPath)) +// } +//} private fun Project.kapt(configure: KaptExtension.() -> Unit): Unit = (this as ExtensionAware).extensions.configure("kapt", configure) diff --git a/build-logic/gradle/libraries.versions.toml b/build-logic/gradle/libraries.versions.toml index d97a9d66..e3cd35ae 100644 --- a/build-logic/gradle/libraries.versions.toml +++ b/build-logic/gradle/libraries.versions.toml @@ -1,106 +1,152 @@ [versions] +# ------------------------------------------------------------------- +# Toolchain / SDK +# ------------------------------------------------------------------- jdk = "17" minSdk = "24" targetSdk = "34" -compileSdk = "34" +compileSdk = "36" sourceCompatibility = "17" targetCompatibility = "17" -agp = "8.13.2" +# ------------------------------------------------------------------- +# Build plugins +# ------------------------------------------------------------------- +# NOTE: If Android Studio warns "Latest supported is AGP 9.0.0", use agp = "9.0.1" +agp = "9.1.0" kotlin = "2.3.10" ksp = "2.3.6" -androidx-core-ktx = "1.13.1" -androidx-activity-ktx = "1.9.3" -androidx-fragment-ktx = "1.8.4" +# ------------------------------------------------------------------- +# AndroidX +# ------------------------------------------------------------------- +androidx-core-ktx = "1.17.0" +androidx-activity-ktx = "1.12.4" +androidx-fragment-ktx = "1.8.9" androidx-preference-ktx = "1.2.1" -androidx-constraintlayout = "2.1.4" -androidx-swiperefreshlayout = "1.1.0" -androidx-browser = "1.8.0" -androidx-lifecycle = "2.8.6" +androidx-constraintlayout = "2.2.1" +androidx-swiperefreshlayout = "1.2.0" +androidx-browser = "1.9.0" +androidx-lifecycle = "2.10.0" +androidx-annotation = "1.9.1" +androidx-appcompat = "1.7.1" +androidx-startup = "1.2.0" +androidx-workmanager = "2.11.1" +androidx-workmanager-hilt = "1.3.0" + androidx-test-core = "2.2.0" -androidx-test-junit-ktx = "1.2.1" -androidx-test-rules = "1.6.1" -androidx-test-runner = "1.6.2" -androidx-annotation = "1.9.0" -androidx-appcompat = "1.7.0" -androidx-compose = "1.7.4" -androidx-compose-activity = "1.9.3" -androidx-compose-bom = "2024.10.00" -androidx-compose-navigation = "2.8.3" -androidx-compose-navigation-hilt = "1.2.0" -androidx-compose-ui-constraintlayout = "1.0.1" +androidx-test-junit-ktx = "1.3.0" +androidx-test-rules = "1.7.0" +androidx-test-runner = "1.7.0" + +androidx-media = "1.7.1" +androidx-media3-exoplayer = "1.9.2" + +# ------------------------------------------------------------------- +# Compose +# ------------------------------------------------------------------- +androidx-compose = "1.10.4" +androidx-compose-activity = "1.12.4" +androidx-compose-bom = "2026.02.01" +androidx-compose-navigation = "2.9.7" +androidx-compose-navigation-hilt = "1.3.0" +androidx-compose-ui-constraintlayout = "1.1.1" androidx-compose-lifecycle = "2.6.0" -androidx-media = "1.7.0" -androidx-media3-exoplayer = "1.4.1" -androidx-startup = "1.2.0" -androidx-workmanager = "2.9.1" -androidx-workmanager-hilt = "1.2.0" -android-material = "1.12.0" -android-versioning = "0.57.16" -android-publish-library = "0.57.16" -accompanist = "0.30.1" -benManes = "0.46.0" -coil = "2.7.0" -commons-android = "5.0.19" -commons-android-binding = "1.0.7" -commons-android-compose = "1.0.1" -commons-android-test = "5.0.3" -commons-core = "5.2.2" -commons-coroutines = "5.5.0" -commons-coroutines-test = "5.0.4" -commons-network = "1.0.2" -commons-network-rx = "1.0.1" -commons-pagination-co = "5.0.4" -commons-pagination-rx = "5.0.4" -commons-permissions = "5.0.4" -commons-preferences = "5.0.5" -commons-rx = "5.0.4" -commons-rx-test = "5.0.4" -commons-threeten = "5.0.4" -commons-threeten-test = "5.0.3" -coroutines = "1.9.0" -kotlinx-serialization-json = "1.7.3" -espresso = "3.6.1" -detekt = "1.22.0" -firebase = "33.5.1" -firebase-appdistribution = "5.0.0" -firebase-crashlytics = "3.0.2" -gradle-play-publisher = "3.8.4" + +# ------------------------------------------------------------------- +# Google / Material / Firebase +# ------------------------------------------------------------------- +android-material = "1.13.0" +firebase = "34.10.0" +firebase-appdistribution = "5.2.1" +firebase-crashlytics = "3.0.6" +play-services = "4.4.4" gradle-secrets = "2.0.1" -glide = "4.13.2" -gander = "3.1.0" -gson = "2.10.1" -hilt = "2.52" -json = "20230227" -landscapist = "2.4.1" -leakcanary = "2.12" -mockk = "1.13.12" -network-response-adapter = "5.0.0" -nmcp = "1.4.4" -okhttp3 = "4.12.0" + +# ------------------------------------------------------------------- +# Kotlin ecosystem +# ------------------------------------------------------------------- +coroutines = "1.10.2" +kotlinx-serialization-json = "1.10.0" + +# ------------------------------------------------------------------- +# Networking / JSON / Utils +# ------------------------------------------------------------------- +okhttp3 = "5.3.2" okhttp-mockwebserver = "2.7.5" -play-services = "4.4.2" -rest-mock = "0.4.4" -retrofit2 = "2.9.0" -roboletric = "4.8.1" -room = "2.6.1" -rootcoverage = "1.8.0" -rx-android = "2.1.1" -rx-kotlin = "2.4.0" -test-logger = "3.2.0" -threetenabp = "1.4.6" +retrofit2 = "3.0.0" +network-response-adapter = "5.0.0" +gson = "2.13.2" +json = "20251224" +threetenabp = "1.4.9" +gander = "3.1.0" timber = "5.0.1" -timber-test = "1.0.1" -truth = "1.4.4" -turbine = "0.9.0" -versionCatalogUpdate = "0.8.1" +gradle-play-publisher = "4.0.0" + +# ------------------------------------------------------------------- +# DI / DB +# ------------------------------------------------------------------- +hilt = "2.59.2" +room = "2.8.4" + +# ------------------------------------------------------------------- +# Images / UI +# ------------------------------------------------------------------- +accompanist = "0.36.0" +coil = "2.7.0" +glide = "4.13.2" +landscapist = "2.9.5" + +# ------------------------------------------------------------------- +# Debug / QA / Analysis +# ------------------------------------------------------------------- +leakcanary = "2.14" +detekt = "2.0.0-alpha.2" +rootcoverage = "1.12.0" +test-logger = "4.0.0" +benManes = "0.53.0" +versionCatalogUpdate = "1.1.0" +nmcp = "1.4.4" + +# ------------------------------------------------------------------- +# Testing +# ------------------------------------------------------------------- junit = "4.13.2" junitVersion = "1.2.1" +truth = "1.4.5" +turbine = "1.2.1" +mockk = "1.14.9" +espresso = "3.7.0" +roboletric = "4.16.1" +rest-mock = "0.4.4" +timber-test = "1.0.1" + +# ------------------------------------------------------------------- +# Your artifacts +# ------------------------------------------------------------------- +android-versioning = "0.57.19" +android-publish-library = "0.57.19" + +commons-android = "5.0.26" +commons-android-binding = "1.0.10" +commons-android-compose = "1.0.4" +commons-android-test = "5.0.6" +commons-core = "5.2.11" +commons-coroutines = "5.5.6" +commons-coroutines-test = "5.0.7" +commons-network = "1.0.9" +commons-pagination-co = "5.0.6" +commons-permissions = "5.0.10" +commons-preferences = "5.0.8" +commons-threeten = "5.0.7" +commons-threeten-test = "5.0.10" [libraries] +# ------------------------------------------------------------------- +# AndroidX - Core +# ------------------------------------------------------------------- androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core-ktx" } androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-ktx" } androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment-ktx" } @@ -109,12 +155,31 @@ androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayo androidx-swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version.ref = "androidx-swiperefreshlayout" } androidx-browser = { module = "androidx.browser:browser", version.ref = "androidx-browser" } androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" } -androidx-test-core = { module = "androidx.arch.core:core-testing", version.ref = "androidx-test-core" } -androidx-test-junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "androidx-test-junit-ktx" } -androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidx-test-rules" } -androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" } androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "androidx-annotation" } androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" } +androidx-startup = { module = "androidx.startup:startup-runtime", version.ref = "androidx-startup" } + +# ------------------------------------------------------------------- +# AndroidX - Work +# ------------------------------------------------------------------- +androidx-work-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "androidx-workmanager" } +androidx-work-hilt = { module = "androidx.hilt:hilt-work", version.ref = "androidx-workmanager-hilt" } +androidx-work-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version.ref = "androidx-workmanager-hilt" } +androidx-work-test = { module = "androidx.work:work-testing", version.ref = "androidx-workmanager" } + +# ------------------------------------------------------------------- +# AndroidX - Media3 +# ------------------------------------------------------------------- +androidx-media = { module = "androidx.media:media", version.ref = "androidx-media" } +androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "androidx-media3-exoplayer" } +androidx-media3-exoplayer-dash = { module = "androidx.media3:media3-exoplayer-dash", version.ref = "androidx-media3-exoplayer" } +androidx-media3-exoplayer-hls = { module = "androidx.media3:media3-exoplayer-hls", version.ref = "androidx-media3-exoplayer" } +androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "androidx-media3-exoplayer" } +androidx-media3-session = { module = "androidx.media3:media3-session", version.ref = "androidx-media3-exoplayer" } + +# ------------------------------------------------------------------- +# Compose (BOM-based: keep versions only in BOM) +# ------------------------------------------------------------------- androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" } androidx-compose-activity = { module = "androidx.activity:activity-compose", version.ref = "androidx-compose-activity" } androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" } @@ -130,20 +195,15 @@ androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", versi androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" } androidx-compose-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" } androidx-compose-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" } -androidx-media = { module = "androidx.media:media", version.ref = "androidx-media" } -androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "androidx-media3-exoplayer" } -androidx-media3-exoplayer-dash = { module = "androidx.media3:media3-exoplayer-dash", version.ref = "androidx-media3-exoplayer" } -androidx-media3-exoplayer-hls = { module = "androidx.media3:media3-exoplayer-hls", version.ref = "androidx-media3-exoplayer" } -androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "androidx-media3-exoplayer" } -androidx-media3-session = { module = "androidx.media3:media3-session", version.ref = "androidx-media3-exoplayer" } -androidx-startup = { module = "androidx.startup:startup-runtime", version.ref = "androidx-startup" } -androidx-work-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "androidx-workmanager" } -androidx-work-hilt = { module = "androidx.hilt:hilt-work", version.ref = "androidx-workmanager-hilt" } -androidx-work-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version.ref = "androidx-workmanager-hilt" } -androidx-work-test = { module = "androidx.work:work-testing", version.ref = "androidx-workmanager" } +# ------------------------------------------------------------------- +# Material +# ------------------------------------------------------------------- android-material = { module = "com.google.android.material:material", version.ref = "android-material" } +# ------------------------------------------------------------------- +# Accompanist / Coil / Landscapist +# ------------------------------------------------------------------- accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanist" } accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" } @@ -151,130 +211,179 @@ coil = { module = "io.coil-kt:coil", version.ref = "coil" } coil-svg = { module = "io.coil-kt:coil-svg", version.ref = "coil" } coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" } -commons-android = { module = "com.raxdenstudios:commons-android", version.ref = "commons-android" } -commons-android-binding = { module = "com.raxdenstudios:commons-android-binding", version.ref = "commons-android-binding" } -commons-android-compose = { module = "com.raxdenstudios:commons-android-compose", version.ref = "commons-android-compose" } -commons-android-test = { module = "com.raxdenstudios:commons-android-test", version.ref = "commons-android-test" } -commons-core = { module = "com.raxdenstudios:commons-core", version.ref = "commons-core" } -commons-coroutines = { module = "com.raxdenstudios:commons-coroutines", version.ref = "commons-coroutines" } -commons-coroutines-test = { module = "com.raxdenstudios:commons-coroutines-test", version.ref = "commons-coroutines-test" } -commons-network = { module = "com.raxdenstudios:commons-network", version.ref = "commons-network" } -commons-pagination-co = { module = "com.raxdenstudios:commons-pagination-co", version.ref = "commons-pagination-co" } -commons-permissions = { module = "com.raxdenstudios:commons-permissions", version.ref = "commons-permissions" } -commons-preferences = { module = "com.raxdenstudios:commons-preferences", version.ref = "commons-preferences" } -commons-threetenabp = { module = "com.raxdenstudios:commons-threeten", version.ref = "commons-threeten" } -commons-threetenabp-test = { module = "com.raxdenstudios:commons-threeten-test", version.ref = "commons-threeten-test" } - -coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } -coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } -kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" } - -espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } -espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" } -espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "espresso" } +landscapist-coil = { module = "com.github.skydoves:landscapist-coil", version.ref = "landscapist" } +landscapist-palette = { module = "com.github.skydoves:landscapist-palette", version.ref = "landscapist" } +landscapist-animation = { module = "com.github.skydoves:landscapist-animation", version.ref = "landscapist" } +landscapist-placeholder = { module = "com.github.skydoves:landscapist-placeholder", version.ref = "landscapist" } -firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" } +# ------------------------------------------------------------------- +# Firebase (use BOM) +# ------------------------------------------------------------------- firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase" } +firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" } firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx" } firebase-messaging = { module = "com.google.firebase:firebase-messaging-ktx" } -gander-debug = { module = "com.ashokvarma.android:gander-imdb", version.ref = "gander" } -gander-release = { module = "com.ashokvarma.android:gander-no-op", version.ref = "gander" } - -gson = { module = "com.google.code.gson:gson", version.ref = "gson" } - +# ------------------------------------------------------------------- +# Hilt +# ------------------------------------------------------------------- hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt" } hilt-test = { module = "com.google.dagger:hilt-android-testing", version.ref = "hilt" } -json = { module = "org.json:json", version.ref = "json" } - -landscapist-coil = { module = "com.github.skydoves:landscapist-coil", version.ref = "landscapist" } -landscapist-palette = { module = "com.github.skydoves:landscapist-palette", version.ref = "landscapist" } -landscapist-animation = { module = "com.github.skydoves:landscapist-animation", version.ref = "landscapist" } -landscapist-placeholder = { module = "com.github.skydoves:landscapist-placeholder", version.ref = "landscapist" } - -leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" } - -mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" } - -network-response-adapter = { module = "com.github.haroldadmin:NetworkResponseAdapter", version.ref = "network-response-adapter" } +# ------------------------------------------------------------------- +# KotlinX +# ------------------------------------------------------------------- +coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } +coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" } +# ------------------------------------------------------------------- +# Networking / JSON +# ------------------------------------------------------------------- okhttp3 = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp3" } okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp3" } okhttp-mockwebserver = { module = "com.squareup.okhttp:mockwebserver", version.ref = "okhttp-mockwebserver" } -restmock = { module = "com.github.andrzejchm.RESTMock:android", version.ref = "rest-mock" } - retrofit-core = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit2" } retrofit-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit2" } -retrofit-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "retrofit2" } -robolectric = { module = "org.robolectric:robolectric", version.ref = "roboletric" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } +json = { module = "org.json:json", version.ref = "json" } + +network-response-adapter = { module = "com.github.haroldadmin:NetworkResponseAdapter", version.ref = "network-response-adapter" } +# ------------------------------------------------------------------- +# Room (KSP compiler in usage: ksp(libs.room-compiler)) +# ------------------------------------------------------------------- room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" } room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" } room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" } room-test = { module = "androidx.room:room-testing", version.ref = "room" } -rx-android = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rx-android" } -rx-kotlin = { module = "io.reactivex.rxjava2:rxkotlin", version.ref = "rx-kotlin" } +# ------------------------------------------------------------------- +# Debug / QA +# ------------------------------------------------------------------- +leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" } -threetenabp = { module = "com.jakewharton.threetenabp:threetenabp", version.ref = "threetenabp" } +# ------------------------------------------------------------------- +# Testing +# ------------------------------------------------------------------- +androidx-test-core = { module = "androidx.arch.core:core-testing", version.ref = "androidx-test-core" } +androidx-test-junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "androidx-test-junit-ktx" } +androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidx-test-rules" } +androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" } -timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" } -timber-test = { module = "net.lachlanmckee:timber-junit-rule", version.ref = "timber-test" } +espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } +espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" } +espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "espresso" } -truth = { module = "com.google.truth:truth", version.ref = "truth" } +robolectric = { module = "org.robolectric:robolectric", version.ref = "roboletric" } +mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" } +truth = { module = "com.google.truth:truth", version.ref = "truth" } turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" } +timber-test = { module = "net.lachlanmckee:timber-junit-rule", version.ref = "timber-test" } +restmock = { module = "com.github.andrzejchm.RESTMock:android", version.ref = "rest-mock" } + +# ------------------------------------------------------------------- +# Logging / Misc +# ------------------------------------------------------------------- +timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" } +threetenabp = { module = "com.jakewharton.threetenabp:threetenabp", version.ref = "threetenabp" } + +# ------------------------------------------------------------------- +# Your published libs +# ------------------------------------------------------------------- +commons-android = { module = "com.raxdenstudios:commons-android", version.ref = "commons-android" } +commons-android-binding = { module = "com.raxdenstudios:commons-android-binding", version.ref = "commons-android-binding" } +commons-android-compose = { module = "com.raxdenstudios:commons-android-compose", version.ref = "commons-android-compose" } +commons-android-test = { module = "com.raxdenstudios:commons-android-test", version.ref = "commons-android-test" } +commons-core = { module = "com.raxdenstudios:commons-core", version.ref = "commons-core" } +commons-coroutines = { module = "com.raxdenstudios:commons-coroutines", version.ref = "commons-coroutines" } +commons-coroutines-test = { module = "com.raxdenstudios:commons-coroutines-test", version.ref = "commons-coroutines-test" } +commons-network = { module = "com.raxdenstudios:commons-network", version.ref = "commons-network" } +commons-pagination-co = { module = "com.raxdenstudios:commons-pagination-co", version.ref = "commons-pagination-co" } +commons-permissions = { module = "com.raxdenstudios:commons-permissions", version.ref = "commons-permissions" } +commons-preferences = { module = "com.raxdenstudios:commons-preferences", version.ref = "commons-preferences" } +commons-threetenabp = { module = "com.raxdenstudios:commons-threeten", version.ref = "commons-threeten" } +commons-threetenabp-test = { module = "com.raxdenstudios:commons-threeten-test", version.ref = "commons-threeten-test" } -# Dependencies of the included build-logic +# ------------------------------------------------------------------- +# Build-logic / plugin classpath dependencies (included build) +# ------------------------------------------------------------------- android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "agp" } kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } kotlin-compose-gradlePlugin = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" } kotlin-serialization-gradlePlugin = { module = "org.jetbrains.kotlin.plugin.serialization:org.jetbrains.kotlin.plugin.serialization.gradle.plugin", version.ref = "kotlin" } -rootcoverage-gradlePlugin = { module = "nl.neotech.plugin.rootcoverage:nl.neotech.plugin.rootcoverage.gradle.plugin", version.ref = "rootcoverage" } -detekt-gradlePlugin = { module = "io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin", version.ref = "detekt" } ksp-gradlePlugin = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } +rootcoverage-gradlePlugin = { module = "nl.neotech.plugin.rootcoverage:nl.neotech.plugin.rootcoverage.gradle.plugin", version.ref = "rootcoverage" } + +# Detekt 2.x artifacts +detekt-gradlePlugin = { module = "dev.detekt:detekt-gradle-plugin", version.ref = "detekt" } +detekt-formatting = { module = "dev.detekt:detekt-formatting", version.ref = "detekt" } + + [plugins] +# ------------------------------------------------------------------- +# Android +# ------------------------------------------------------------------- android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } -firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } -firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } -hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } -play-services = { id = "com.google.gms.google-services", version.ref = "play-services" } -gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "gradle-secrets" } - -android-versioning = { id = "com.raxdenstudios.android-versioning", version.ref = "android-versioning" } -android-publish-library = { id = "com.raxdenstudios.android-publish-library", version.ref = "android-publish-library" } - +# ------------------------------------------------------------------- +# Kotlin +# ------------------------------------------------------------------- kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +# ------------------------------------------------------------------- +# KSP +# ------------------------------------------------------------------- ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } -detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } -detekt-formatting = { id = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" } +# ------------------------------------------------------------------- +# Firebase / Google +# ------------------------------------------------------------------- +firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } +firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } +play-services = { id = "com.google.gms.google-services", version.ref = "play-services" } +gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "gradle-secrets" } + +# ------------------------------------------------------------------- +# Hilt +# ------------------------------------------------------------------- +hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } + +# ------------------------------------------------------------------- +# Quality +# ------------------------------------------------------------------- +# Detekt 2.x uses plugin id "dev.detekt" +detekt = { id = "dev.detekt", version.ref = "detekt" } rootcoverage = { id = "nl.neotech.plugin.rootcoverage", version.ref = "rootcoverage" } +test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" } + +# ------------------------------------------------------------------- +# Publishing / tooling +# ------------------------------------------------------------------- +android-versioning = { id = "com.raxdenstudios.android-versioning", version.ref = "android-versioning" } +android-publish-library = { id = "com.raxdenstudios.android-publish-library", version.ref = "android-publish-library" } nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" } nmcp = { id = "com.gradleup.nmcp", version.ref = "nmcp" } - gradle-play-publisher = { id = "com.github.triplet.play", version.ref = "gradle-play-publisher" } -test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" } - benManes = { id = "com.github.ben-manes.versions", version.ref = "benManes" } versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdate" } +# ------------------------------------------------------------------- # Plugins defined by this project +# ------------------------------------------------------------------- android-application-conventions = { id = "android-application-conventions" } android-compose-application-conventions = { id = "android-compose-application-conventions" } android-compose-feature-conventions = { id = "android-compose-feature-conventions" } @@ -286,10 +395,14 @@ android-project-conventions = { id = "android-project-conventions" } [bundles] +# ------------------------------------------------------------------- +# Bundles +# ------------------------------------------------------------------- android-material = [ "android-material", "timber", ] + android-compose = [ "androidx-compose-bom", "androidx-compose-activity", @@ -310,11 +423,13 @@ android-compose = [ "landscapist-palette", "landscapist-placeholder", ] + debug-android-compose = [ "androidx-compose-bom", "androidx-compose-ui-test-manifest", "androidx-compose-ui-tooling", ] + android-media3 = [ "androidx-media", # Needed MediaSessionCompat.Token "androidx-media3-exoplayer", @@ -323,59 +438,51 @@ android-media3 = [ "androidx-media3-ui", "androidx-media3-session", ] + android-workmanager = [ "androidx-work-ktx", "androidx-work-hilt", "androidx-work-hilt-compiler", ] + coil-compose = [ "coil", "coil-svg", "coil-compose", ] + hilt = [ "hilt-android", "hilt-compiler", ] + room = [ "room-ktx", "room-runtime", "room-compiler", ] + firebase = [ "firebase-bom", "firebase-analytics", "firebase-crashlytics", "firebase-messaging", ] + okhttp3 = [ - # "okhttp3-bom", "okhttp3", "okhttp3-logging-interceptor", ] + retrofit2 = [ "retrofit-core", "retrofit-gson", - # "okhttp3-bom", - "okhttp3", - "okhttp3-logging-interceptor", - "network-response-adapter", - "gson", -] -retrofit2Rx = [ - "retrofit-core", - "retrofit-gson", - "retrofit-rxjava2", - # "okhttp3-bom", "okhttp3", "okhttp3-logging-interceptor", "network-response-adapter", "gson", ] -rx = [ - "rx-android", - "rx-kotlin", -] + test = [ "androidx-test-core", "androidx-test-junit-ktx", @@ -384,40 +491,42 @@ test = [ "mockk-android", "timber-test", "truth", - "json", # its really necessary? + "json", ] + test-android-material = [ - # "mockk-android", "timber-test", - # "truth", ] + test-android-compose = [ "androidx-compose-bom", "androidx-compose-ui-test-junit4", ] + test-hilt = [ "hilt-test", "hilt-compiler", ] + test-room = [ "room-test", ] -test-rx = [ - "rx-android", - "rx-kotlin", -] + test-coroutines = [ "coroutines-test", "turbine", ] + test-threetenabp = [ "threetenabp", ] + test-espresso = [ "espresso-core", "espresso-contrib", "espresso-intents" ] + test-mockwebserver = [ "restmock", "okhttp-mockwebserver", diff --git a/build-logic/gradle/wrapper/gradle-wrapper.properties b/build-logic/gradle/wrapper/gradle-wrapper.properties index 29a0dd9a..f50f69e3 100644 --- a/build-logic/gradle/wrapper/gradle-wrapper.properties +++ b/build-logic/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/build.gradle.kts b/build.gradle.kts index 52814832..1387d91c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -89,6 +89,12 @@ tasks { val clean by registering(Delete::class) { delete(buildDir) } + + register("printKotlinVersion") { + doLast { + println(org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION) + } + } } private fun getPublicationName(): String { diff --git a/gradle/libraries.versions.toml b/gradle/libraries.versions.toml index d97a9d66..e3cd35ae 100644 --- a/gradle/libraries.versions.toml +++ b/gradle/libraries.versions.toml @@ -1,106 +1,152 @@ [versions] +# ------------------------------------------------------------------- +# Toolchain / SDK +# ------------------------------------------------------------------- jdk = "17" minSdk = "24" targetSdk = "34" -compileSdk = "34" +compileSdk = "36" sourceCompatibility = "17" targetCompatibility = "17" -agp = "8.13.2" +# ------------------------------------------------------------------- +# Build plugins +# ------------------------------------------------------------------- +# NOTE: If Android Studio warns "Latest supported is AGP 9.0.0", use agp = "9.0.1" +agp = "9.1.0" kotlin = "2.3.10" ksp = "2.3.6" -androidx-core-ktx = "1.13.1" -androidx-activity-ktx = "1.9.3" -androidx-fragment-ktx = "1.8.4" +# ------------------------------------------------------------------- +# AndroidX +# ------------------------------------------------------------------- +androidx-core-ktx = "1.17.0" +androidx-activity-ktx = "1.12.4" +androidx-fragment-ktx = "1.8.9" androidx-preference-ktx = "1.2.1" -androidx-constraintlayout = "2.1.4" -androidx-swiperefreshlayout = "1.1.0" -androidx-browser = "1.8.0" -androidx-lifecycle = "2.8.6" +androidx-constraintlayout = "2.2.1" +androidx-swiperefreshlayout = "1.2.0" +androidx-browser = "1.9.0" +androidx-lifecycle = "2.10.0" +androidx-annotation = "1.9.1" +androidx-appcompat = "1.7.1" +androidx-startup = "1.2.0" +androidx-workmanager = "2.11.1" +androidx-workmanager-hilt = "1.3.0" + androidx-test-core = "2.2.0" -androidx-test-junit-ktx = "1.2.1" -androidx-test-rules = "1.6.1" -androidx-test-runner = "1.6.2" -androidx-annotation = "1.9.0" -androidx-appcompat = "1.7.0" -androidx-compose = "1.7.4" -androidx-compose-activity = "1.9.3" -androidx-compose-bom = "2024.10.00" -androidx-compose-navigation = "2.8.3" -androidx-compose-navigation-hilt = "1.2.0" -androidx-compose-ui-constraintlayout = "1.0.1" +androidx-test-junit-ktx = "1.3.0" +androidx-test-rules = "1.7.0" +androidx-test-runner = "1.7.0" + +androidx-media = "1.7.1" +androidx-media3-exoplayer = "1.9.2" + +# ------------------------------------------------------------------- +# Compose +# ------------------------------------------------------------------- +androidx-compose = "1.10.4" +androidx-compose-activity = "1.12.4" +androidx-compose-bom = "2026.02.01" +androidx-compose-navigation = "2.9.7" +androidx-compose-navigation-hilt = "1.3.0" +androidx-compose-ui-constraintlayout = "1.1.1" androidx-compose-lifecycle = "2.6.0" -androidx-media = "1.7.0" -androidx-media3-exoplayer = "1.4.1" -androidx-startup = "1.2.0" -androidx-workmanager = "2.9.1" -androidx-workmanager-hilt = "1.2.0" -android-material = "1.12.0" -android-versioning = "0.57.16" -android-publish-library = "0.57.16" -accompanist = "0.30.1" -benManes = "0.46.0" -coil = "2.7.0" -commons-android = "5.0.19" -commons-android-binding = "1.0.7" -commons-android-compose = "1.0.1" -commons-android-test = "5.0.3" -commons-core = "5.2.2" -commons-coroutines = "5.5.0" -commons-coroutines-test = "5.0.4" -commons-network = "1.0.2" -commons-network-rx = "1.0.1" -commons-pagination-co = "5.0.4" -commons-pagination-rx = "5.0.4" -commons-permissions = "5.0.4" -commons-preferences = "5.0.5" -commons-rx = "5.0.4" -commons-rx-test = "5.0.4" -commons-threeten = "5.0.4" -commons-threeten-test = "5.0.3" -coroutines = "1.9.0" -kotlinx-serialization-json = "1.7.3" -espresso = "3.6.1" -detekt = "1.22.0" -firebase = "33.5.1" -firebase-appdistribution = "5.0.0" -firebase-crashlytics = "3.0.2" -gradle-play-publisher = "3.8.4" + +# ------------------------------------------------------------------- +# Google / Material / Firebase +# ------------------------------------------------------------------- +android-material = "1.13.0" +firebase = "34.10.0" +firebase-appdistribution = "5.2.1" +firebase-crashlytics = "3.0.6" +play-services = "4.4.4" gradle-secrets = "2.0.1" -glide = "4.13.2" -gander = "3.1.0" -gson = "2.10.1" -hilt = "2.52" -json = "20230227" -landscapist = "2.4.1" -leakcanary = "2.12" -mockk = "1.13.12" -network-response-adapter = "5.0.0" -nmcp = "1.4.4" -okhttp3 = "4.12.0" + +# ------------------------------------------------------------------- +# Kotlin ecosystem +# ------------------------------------------------------------------- +coroutines = "1.10.2" +kotlinx-serialization-json = "1.10.0" + +# ------------------------------------------------------------------- +# Networking / JSON / Utils +# ------------------------------------------------------------------- +okhttp3 = "5.3.2" okhttp-mockwebserver = "2.7.5" -play-services = "4.4.2" -rest-mock = "0.4.4" -retrofit2 = "2.9.0" -roboletric = "4.8.1" -room = "2.6.1" -rootcoverage = "1.8.0" -rx-android = "2.1.1" -rx-kotlin = "2.4.0" -test-logger = "3.2.0" -threetenabp = "1.4.6" +retrofit2 = "3.0.0" +network-response-adapter = "5.0.0" +gson = "2.13.2" +json = "20251224" +threetenabp = "1.4.9" +gander = "3.1.0" timber = "5.0.1" -timber-test = "1.0.1" -truth = "1.4.4" -turbine = "0.9.0" -versionCatalogUpdate = "0.8.1" +gradle-play-publisher = "4.0.0" + +# ------------------------------------------------------------------- +# DI / DB +# ------------------------------------------------------------------- +hilt = "2.59.2" +room = "2.8.4" + +# ------------------------------------------------------------------- +# Images / UI +# ------------------------------------------------------------------- +accompanist = "0.36.0" +coil = "2.7.0" +glide = "4.13.2" +landscapist = "2.9.5" + +# ------------------------------------------------------------------- +# Debug / QA / Analysis +# ------------------------------------------------------------------- +leakcanary = "2.14" +detekt = "2.0.0-alpha.2" +rootcoverage = "1.12.0" +test-logger = "4.0.0" +benManes = "0.53.0" +versionCatalogUpdate = "1.1.0" +nmcp = "1.4.4" + +# ------------------------------------------------------------------- +# Testing +# ------------------------------------------------------------------- junit = "4.13.2" junitVersion = "1.2.1" +truth = "1.4.5" +turbine = "1.2.1" +mockk = "1.14.9" +espresso = "3.7.0" +roboletric = "4.16.1" +rest-mock = "0.4.4" +timber-test = "1.0.1" + +# ------------------------------------------------------------------- +# Your artifacts +# ------------------------------------------------------------------- +android-versioning = "0.57.19" +android-publish-library = "0.57.19" + +commons-android = "5.0.26" +commons-android-binding = "1.0.10" +commons-android-compose = "1.0.4" +commons-android-test = "5.0.6" +commons-core = "5.2.11" +commons-coroutines = "5.5.6" +commons-coroutines-test = "5.0.7" +commons-network = "1.0.9" +commons-pagination-co = "5.0.6" +commons-permissions = "5.0.10" +commons-preferences = "5.0.8" +commons-threeten = "5.0.7" +commons-threeten-test = "5.0.10" [libraries] +# ------------------------------------------------------------------- +# AndroidX - Core +# ------------------------------------------------------------------- androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core-ktx" } androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-ktx" } androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment-ktx" } @@ -109,12 +155,31 @@ androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayo androidx-swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version.ref = "androidx-swiperefreshlayout" } androidx-browser = { module = "androidx.browser:browser", version.ref = "androidx-browser" } androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" } -androidx-test-core = { module = "androidx.arch.core:core-testing", version.ref = "androidx-test-core" } -androidx-test-junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "androidx-test-junit-ktx" } -androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidx-test-rules" } -androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" } androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "androidx-annotation" } androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" } +androidx-startup = { module = "androidx.startup:startup-runtime", version.ref = "androidx-startup" } + +# ------------------------------------------------------------------- +# AndroidX - Work +# ------------------------------------------------------------------- +androidx-work-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "androidx-workmanager" } +androidx-work-hilt = { module = "androidx.hilt:hilt-work", version.ref = "androidx-workmanager-hilt" } +androidx-work-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version.ref = "androidx-workmanager-hilt" } +androidx-work-test = { module = "androidx.work:work-testing", version.ref = "androidx-workmanager" } + +# ------------------------------------------------------------------- +# AndroidX - Media3 +# ------------------------------------------------------------------- +androidx-media = { module = "androidx.media:media", version.ref = "androidx-media" } +androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "androidx-media3-exoplayer" } +androidx-media3-exoplayer-dash = { module = "androidx.media3:media3-exoplayer-dash", version.ref = "androidx-media3-exoplayer" } +androidx-media3-exoplayer-hls = { module = "androidx.media3:media3-exoplayer-hls", version.ref = "androidx-media3-exoplayer" } +androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "androidx-media3-exoplayer" } +androidx-media3-session = { module = "androidx.media3:media3-session", version.ref = "androidx-media3-exoplayer" } + +# ------------------------------------------------------------------- +# Compose (BOM-based: keep versions only in BOM) +# ------------------------------------------------------------------- androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" } androidx-compose-activity = { module = "androidx.activity:activity-compose", version.ref = "androidx-compose-activity" } androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" } @@ -130,20 +195,15 @@ androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", versi androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" } androidx-compose-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" } androidx-compose-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" } -androidx-media = { module = "androidx.media:media", version.ref = "androidx-media" } -androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "androidx-media3-exoplayer" } -androidx-media3-exoplayer-dash = { module = "androidx.media3:media3-exoplayer-dash", version.ref = "androidx-media3-exoplayer" } -androidx-media3-exoplayer-hls = { module = "androidx.media3:media3-exoplayer-hls", version.ref = "androidx-media3-exoplayer" } -androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "androidx-media3-exoplayer" } -androidx-media3-session = { module = "androidx.media3:media3-session", version.ref = "androidx-media3-exoplayer" } -androidx-startup = { module = "androidx.startup:startup-runtime", version.ref = "androidx-startup" } -androidx-work-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "androidx-workmanager" } -androidx-work-hilt = { module = "androidx.hilt:hilt-work", version.ref = "androidx-workmanager-hilt" } -androidx-work-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version.ref = "androidx-workmanager-hilt" } -androidx-work-test = { module = "androidx.work:work-testing", version.ref = "androidx-workmanager" } +# ------------------------------------------------------------------- +# Material +# ------------------------------------------------------------------- android-material = { module = "com.google.android.material:material", version.ref = "android-material" } +# ------------------------------------------------------------------- +# Accompanist / Coil / Landscapist +# ------------------------------------------------------------------- accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanist" } accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" } @@ -151,130 +211,179 @@ coil = { module = "io.coil-kt:coil", version.ref = "coil" } coil-svg = { module = "io.coil-kt:coil-svg", version.ref = "coil" } coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" } -commons-android = { module = "com.raxdenstudios:commons-android", version.ref = "commons-android" } -commons-android-binding = { module = "com.raxdenstudios:commons-android-binding", version.ref = "commons-android-binding" } -commons-android-compose = { module = "com.raxdenstudios:commons-android-compose", version.ref = "commons-android-compose" } -commons-android-test = { module = "com.raxdenstudios:commons-android-test", version.ref = "commons-android-test" } -commons-core = { module = "com.raxdenstudios:commons-core", version.ref = "commons-core" } -commons-coroutines = { module = "com.raxdenstudios:commons-coroutines", version.ref = "commons-coroutines" } -commons-coroutines-test = { module = "com.raxdenstudios:commons-coroutines-test", version.ref = "commons-coroutines-test" } -commons-network = { module = "com.raxdenstudios:commons-network", version.ref = "commons-network" } -commons-pagination-co = { module = "com.raxdenstudios:commons-pagination-co", version.ref = "commons-pagination-co" } -commons-permissions = { module = "com.raxdenstudios:commons-permissions", version.ref = "commons-permissions" } -commons-preferences = { module = "com.raxdenstudios:commons-preferences", version.ref = "commons-preferences" } -commons-threetenabp = { module = "com.raxdenstudios:commons-threeten", version.ref = "commons-threeten" } -commons-threetenabp-test = { module = "com.raxdenstudios:commons-threeten-test", version.ref = "commons-threeten-test" } - -coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } -coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } -kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" } - -espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } -espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" } -espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "espresso" } +landscapist-coil = { module = "com.github.skydoves:landscapist-coil", version.ref = "landscapist" } +landscapist-palette = { module = "com.github.skydoves:landscapist-palette", version.ref = "landscapist" } +landscapist-animation = { module = "com.github.skydoves:landscapist-animation", version.ref = "landscapist" } +landscapist-placeholder = { module = "com.github.skydoves:landscapist-placeholder", version.ref = "landscapist" } -firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" } +# ------------------------------------------------------------------- +# Firebase (use BOM) +# ------------------------------------------------------------------- firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase" } +firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" } firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx" } firebase-messaging = { module = "com.google.firebase:firebase-messaging-ktx" } -gander-debug = { module = "com.ashokvarma.android:gander-imdb", version.ref = "gander" } -gander-release = { module = "com.ashokvarma.android:gander-no-op", version.ref = "gander" } - -gson = { module = "com.google.code.gson:gson", version.ref = "gson" } - +# ------------------------------------------------------------------- +# Hilt +# ------------------------------------------------------------------- hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt" } hilt-test = { module = "com.google.dagger:hilt-android-testing", version.ref = "hilt" } -json = { module = "org.json:json", version.ref = "json" } - -landscapist-coil = { module = "com.github.skydoves:landscapist-coil", version.ref = "landscapist" } -landscapist-palette = { module = "com.github.skydoves:landscapist-palette", version.ref = "landscapist" } -landscapist-animation = { module = "com.github.skydoves:landscapist-animation", version.ref = "landscapist" } -landscapist-placeholder = { module = "com.github.skydoves:landscapist-placeholder", version.ref = "landscapist" } - -leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" } - -mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" } - -network-response-adapter = { module = "com.github.haroldadmin:NetworkResponseAdapter", version.ref = "network-response-adapter" } +# ------------------------------------------------------------------- +# KotlinX +# ------------------------------------------------------------------- +coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } +coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" } +# ------------------------------------------------------------------- +# Networking / JSON +# ------------------------------------------------------------------- okhttp3 = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp3" } okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp3" } okhttp-mockwebserver = { module = "com.squareup.okhttp:mockwebserver", version.ref = "okhttp-mockwebserver" } -restmock = { module = "com.github.andrzejchm.RESTMock:android", version.ref = "rest-mock" } - retrofit-core = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit2" } retrofit-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit2" } -retrofit-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "retrofit2" } -robolectric = { module = "org.robolectric:robolectric", version.ref = "roboletric" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } +json = { module = "org.json:json", version.ref = "json" } + +network-response-adapter = { module = "com.github.haroldadmin:NetworkResponseAdapter", version.ref = "network-response-adapter" } +# ------------------------------------------------------------------- +# Room (KSP compiler in usage: ksp(libs.room-compiler)) +# ------------------------------------------------------------------- room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" } room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" } room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" } room-test = { module = "androidx.room:room-testing", version.ref = "room" } -rx-android = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rx-android" } -rx-kotlin = { module = "io.reactivex.rxjava2:rxkotlin", version.ref = "rx-kotlin" } +# ------------------------------------------------------------------- +# Debug / QA +# ------------------------------------------------------------------- +leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" } -threetenabp = { module = "com.jakewharton.threetenabp:threetenabp", version.ref = "threetenabp" } +# ------------------------------------------------------------------- +# Testing +# ------------------------------------------------------------------- +androidx-test-core = { module = "androidx.arch.core:core-testing", version.ref = "androidx-test-core" } +androidx-test-junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "androidx-test-junit-ktx" } +androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidx-test-rules" } +androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" } -timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" } -timber-test = { module = "net.lachlanmckee:timber-junit-rule", version.ref = "timber-test" } +espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } +espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" } +espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "espresso" } -truth = { module = "com.google.truth:truth", version.ref = "truth" } +robolectric = { module = "org.robolectric:robolectric", version.ref = "roboletric" } +mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" } +truth = { module = "com.google.truth:truth", version.ref = "truth" } turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" } +timber-test = { module = "net.lachlanmckee:timber-junit-rule", version.ref = "timber-test" } +restmock = { module = "com.github.andrzejchm.RESTMock:android", version.ref = "rest-mock" } + +# ------------------------------------------------------------------- +# Logging / Misc +# ------------------------------------------------------------------- +timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" } +threetenabp = { module = "com.jakewharton.threetenabp:threetenabp", version.ref = "threetenabp" } + +# ------------------------------------------------------------------- +# Your published libs +# ------------------------------------------------------------------- +commons-android = { module = "com.raxdenstudios:commons-android", version.ref = "commons-android" } +commons-android-binding = { module = "com.raxdenstudios:commons-android-binding", version.ref = "commons-android-binding" } +commons-android-compose = { module = "com.raxdenstudios:commons-android-compose", version.ref = "commons-android-compose" } +commons-android-test = { module = "com.raxdenstudios:commons-android-test", version.ref = "commons-android-test" } +commons-core = { module = "com.raxdenstudios:commons-core", version.ref = "commons-core" } +commons-coroutines = { module = "com.raxdenstudios:commons-coroutines", version.ref = "commons-coroutines" } +commons-coroutines-test = { module = "com.raxdenstudios:commons-coroutines-test", version.ref = "commons-coroutines-test" } +commons-network = { module = "com.raxdenstudios:commons-network", version.ref = "commons-network" } +commons-pagination-co = { module = "com.raxdenstudios:commons-pagination-co", version.ref = "commons-pagination-co" } +commons-permissions = { module = "com.raxdenstudios:commons-permissions", version.ref = "commons-permissions" } +commons-preferences = { module = "com.raxdenstudios:commons-preferences", version.ref = "commons-preferences" } +commons-threetenabp = { module = "com.raxdenstudios:commons-threeten", version.ref = "commons-threeten" } +commons-threetenabp-test = { module = "com.raxdenstudios:commons-threeten-test", version.ref = "commons-threeten-test" } -# Dependencies of the included build-logic +# ------------------------------------------------------------------- +# Build-logic / plugin classpath dependencies (included build) +# ------------------------------------------------------------------- android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "agp" } kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } kotlin-compose-gradlePlugin = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" } kotlin-serialization-gradlePlugin = { module = "org.jetbrains.kotlin.plugin.serialization:org.jetbrains.kotlin.plugin.serialization.gradle.plugin", version.ref = "kotlin" } -rootcoverage-gradlePlugin = { module = "nl.neotech.plugin.rootcoverage:nl.neotech.plugin.rootcoverage.gradle.plugin", version.ref = "rootcoverage" } -detekt-gradlePlugin = { module = "io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin", version.ref = "detekt" } ksp-gradlePlugin = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } +rootcoverage-gradlePlugin = { module = "nl.neotech.plugin.rootcoverage:nl.neotech.plugin.rootcoverage.gradle.plugin", version.ref = "rootcoverage" } + +# Detekt 2.x artifacts +detekt-gradlePlugin = { module = "dev.detekt:detekt-gradle-plugin", version.ref = "detekt" } +detekt-formatting = { module = "dev.detekt:detekt-formatting", version.ref = "detekt" } + + [plugins] +# ------------------------------------------------------------------- +# Android +# ------------------------------------------------------------------- android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } -firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } -firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } -hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } -play-services = { id = "com.google.gms.google-services", version.ref = "play-services" } -gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "gradle-secrets" } - -android-versioning = { id = "com.raxdenstudios.android-versioning", version.ref = "android-versioning" } -android-publish-library = { id = "com.raxdenstudios.android-publish-library", version.ref = "android-publish-library" } - +# ------------------------------------------------------------------- +# Kotlin +# ------------------------------------------------------------------- kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +# ------------------------------------------------------------------- +# KSP +# ------------------------------------------------------------------- ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } -detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } -detekt-formatting = { id = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" } +# ------------------------------------------------------------------- +# Firebase / Google +# ------------------------------------------------------------------- +firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebase-appdistribution" } +firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" } +play-services = { id = "com.google.gms.google-services", version.ref = "play-services" } +gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "gradle-secrets" } + +# ------------------------------------------------------------------- +# Hilt +# ------------------------------------------------------------------- +hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } + +# ------------------------------------------------------------------- +# Quality +# ------------------------------------------------------------------- +# Detekt 2.x uses plugin id "dev.detekt" +detekt = { id = "dev.detekt", version.ref = "detekt" } rootcoverage = { id = "nl.neotech.plugin.rootcoverage", version.ref = "rootcoverage" } +test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" } + +# ------------------------------------------------------------------- +# Publishing / tooling +# ------------------------------------------------------------------- +android-versioning = { id = "com.raxdenstudios.android-versioning", version.ref = "android-versioning" } +android-publish-library = { id = "com.raxdenstudios.android-publish-library", version.ref = "android-publish-library" } nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" } nmcp = { id = "com.gradleup.nmcp", version.ref = "nmcp" } - gradle-play-publisher = { id = "com.github.triplet.play", version.ref = "gradle-play-publisher" } -test-logger = { id = "com.adarshr.test-logger", version.ref = "test-logger" } - benManes = { id = "com.github.ben-manes.versions", version.ref = "benManes" } versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdate" } +# ------------------------------------------------------------------- # Plugins defined by this project +# ------------------------------------------------------------------- android-application-conventions = { id = "android-application-conventions" } android-compose-application-conventions = { id = "android-compose-application-conventions" } android-compose-feature-conventions = { id = "android-compose-feature-conventions" } @@ -286,10 +395,14 @@ android-project-conventions = { id = "android-project-conventions" } [bundles] +# ------------------------------------------------------------------- +# Bundles +# ------------------------------------------------------------------- android-material = [ "android-material", "timber", ] + android-compose = [ "androidx-compose-bom", "androidx-compose-activity", @@ -310,11 +423,13 @@ android-compose = [ "landscapist-palette", "landscapist-placeholder", ] + debug-android-compose = [ "androidx-compose-bom", "androidx-compose-ui-test-manifest", "androidx-compose-ui-tooling", ] + android-media3 = [ "androidx-media", # Needed MediaSessionCompat.Token "androidx-media3-exoplayer", @@ -323,59 +438,51 @@ android-media3 = [ "androidx-media3-ui", "androidx-media3-session", ] + android-workmanager = [ "androidx-work-ktx", "androidx-work-hilt", "androidx-work-hilt-compiler", ] + coil-compose = [ "coil", "coil-svg", "coil-compose", ] + hilt = [ "hilt-android", "hilt-compiler", ] + room = [ "room-ktx", "room-runtime", "room-compiler", ] + firebase = [ "firebase-bom", "firebase-analytics", "firebase-crashlytics", "firebase-messaging", ] + okhttp3 = [ - # "okhttp3-bom", "okhttp3", "okhttp3-logging-interceptor", ] + retrofit2 = [ "retrofit-core", "retrofit-gson", - # "okhttp3-bom", - "okhttp3", - "okhttp3-logging-interceptor", - "network-response-adapter", - "gson", -] -retrofit2Rx = [ - "retrofit-core", - "retrofit-gson", - "retrofit-rxjava2", - # "okhttp3-bom", "okhttp3", "okhttp3-logging-interceptor", "network-response-adapter", "gson", ] -rx = [ - "rx-android", - "rx-kotlin", -] + test = [ "androidx-test-core", "androidx-test-junit-ktx", @@ -384,40 +491,42 @@ test = [ "mockk-android", "timber-test", "truth", - "json", # its really necessary? + "json", ] + test-android-material = [ - # "mockk-android", "timber-test", - # "truth", ] + test-android-compose = [ "androidx-compose-bom", "androidx-compose-ui-test-junit4", ] + test-hilt = [ "hilt-test", "hilt-compiler", ] + test-room = [ "room-test", ] -test-rx = [ - "rx-android", - "rx-kotlin", -] + test-coroutines = [ "coroutines-test", "turbine", ] + test-threetenabp = [ "threetenabp", ] + test-espresso = [ "espresso-core", "espresso-contrib", "espresso-intents" ] + test-mockwebserver = [ "restmock", "okhttp-mockwebserver", diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a3a17a86..e1f0f9aa 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libraries/android/src/main/java/com/raxdenstudios/commons/android/property/FragmentByIdDelegate.kt b/libraries/android/src/main/java/com/raxdenstudios/commons/android/property/FragmentByIdDelegate.kt index d8978f37..bd9ea2cd 100644 --- a/libraries/android/src/main/java/com/raxdenstudios/commons/android/property/FragmentByIdDelegate.kt +++ b/libraries/android/src/main/java/com/raxdenstudios/commons/android/property/FragmentByIdDelegate.kt @@ -5,9 +5,8 @@ import androidx.fragment.app.Fragment import kotlin.properties.ReadOnlyProperty import kotlin.reflect.KProperty -@Suppress("UNCHECKED_CAST") class FragmentByIdDelegate( - @IdRes private val fragmentId: Int + @field:IdRes private val fragmentId: Int ) : ReadOnlyProperty { private var fragment: T? = null @@ -17,6 +16,7 @@ class FragmentByIdDelegate( property: KProperty<*> ): T = fragment ?: findFragmentById(thisRef).also { fragment = it } + @Suppress("UNCHECKED_CAST") private fun findFragmentById( thisRef: Fragment, ): T = thisRef.childFragmentManager.findFragmentById(fragmentId) as T diff --git a/libraries/android/src/main/java/com/raxdenstudios/commons/android/util/SDK.kt b/libraries/android/src/main/java/com/raxdenstudios/commons/android/util/SDK.kt index 47db2a7d..cf972cc1 100644 --- a/libraries/android/src/main/java/com/raxdenstudios/commons/android/util/SDK.kt +++ b/libraries/android/src/main/java/com/raxdenstudios/commons/android/util/SDK.kt @@ -36,7 +36,7 @@ object SDK { /** * Only works when is called in onCreate */ - @SuppressLint("InternalInsetResource") + @SuppressLint("InternalInsetResource", "DiscouragedApi") fun getStatusBarHeight(context: Context): Int { val resourceId: Int = context.resources.getIdentifier("status_bar_height", "dimen", "android") @@ -46,10 +46,12 @@ object SDK { } fun getPackageName(context: Context): String = - runCatching { context.getPackageInfo().packageName }.getOrDefault("") + runCatching { context.getPackageInfo().packageName } + .getOrDefault("") fun getVersionName(context: Context): String = - runCatching { context.getPackageInfo().versionName.orDefault() }.getOrDefault("") + runCatching { context.getPackageInfo().versionName.orDefault() } + .getOrDefault("") fun getVersionCode(context: Context): Long = when { Build.VERSION.SDK_INT >= Build.VERSION_CODES.P -> diff --git a/libraries/permissions/src/main/java/com/raxdenstudios/commons/permissions/model/RationaleDialog.kt b/libraries/permissions/src/main/java/com/raxdenstudios/commons/permissions/model/RationaleDialog.kt index 64033a8a..26c675eb 100644 --- a/libraries/permissions/src/main/java/com/raxdenstudios/commons/permissions/model/RationaleDialog.kt +++ b/libraries/permissions/src/main/java/com/raxdenstudios/commons/permissions/model/RationaleDialog.kt @@ -4,10 +4,10 @@ import androidx.annotation.StringRes import com.raxdenstudios.commons.permissions.R sealed class RationaleDialog( - @StringRes val reason: Int, - @StringRes val reasonDescription: Int, - @StringRes val acceptLabel: Int, - @StringRes val deniedLabel: Int + @field:StringRes val reason: Int, + @field:StringRes val reasonDescription: Int, + @field:StringRes val acceptLabel: Int, + @field:StringRes val deniedLabel: Int ) { data object Camera : RationaleDialog(