Skip to content

Commit ec1222b

Browse files
authored
Start adopting version catalog (#4401)
This just starts the adoption, with just a few entries in the catalog. The rest will come in separate PRs
1 parent 3d034dd commit ec1222b

File tree

52 files changed

+68
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+68
-64
lines changed

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ plugins {
1818
id(Config.QualityPlugins.jacocoAndroid) version Config.QualityPlugins.jacocoAndroidVersion apply false
1919
id(Config.QualityPlugins.kover) version Config.QualityPlugins.koverVersion apply false
2020
id(Config.BuildPlugins.gradleMavenPublishPlugin) version Config.BuildPlugins.gradleMavenPublishPluginVersion apply false
21+
alias(libs.plugins.kotlin.android) apply false
2122
}
2223

2324
buildscript {
@@ -26,7 +27,6 @@ buildscript {
2627
}
2728
dependencies {
2829
classpath(Config.BuildPlugins.androidGradle)
29-
classpath(kotlin(Config.BuildPlugins.kotlinGradlePlugin, version = Config.kotlinVersion))
3030
// dokka is required by gradle-maven-publish-plugin.
3131
classpath(Config.BuildPlugins.dokkaPlugin)
3232
classpath(Config.QualityPlugins.errorpronePlugin)
@@ -200,7 +200,6 @@ subprojects {
200200
afterEvaluate {
201201
apply<MavenPublishPlugin>()
202202

203-
@Suppress("UnstableApiUsage")
204203
configure<MavenPublishBaseExtension> {
205204
assignAarTypes()
206205
}

buildSrc/src/main/java/Config.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import java.math.BigDecimal
33

44
object Config {
55
val AGP = System.getenv("VERSION_AGP") ?: "8.6.0"
6-
val kotlinVersion = "1.9.24"
76
val kotlinStdLib = "stdlib-jdk8"
87

98
val springBootVersion = "2.7.18"
@@ -17,7 +16,6 @@ object Config {
1716

1817
object BuildPlugins {
1918
val androidGradle = "com.android.tools.build:gradle:$AGP"
20-
val kotlinGradlePlugin = "gradle-plugin"
2119
val buildConfig = "com.github.gmazzo.buildconfig"
2220
val buildConfigVersion = "5.6.5"
2321
val springBoot = "org.springframework.boot"
@@ -193,7 +191,6 @@ object Config {
193191
private val espressoVersion = "3.5.0"
194192

195193
val androidJUnitRunner = "androidx.test.runner.AndroidJUnitRunner"
196-
val kotlinTestJunit = "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
197194
val androidxCore = "androidx.test:core:1.6.1"
198195
val androidxRunner = "androidx.test:runner:1.6.2"
199196
val androidxTestCoreKtx = "androidx.test:core-ktx:1.6.1"

gradle/libs.versions.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[versions]
2+
kotlin = "1.9.24"
3+
4+
[plugins]
5+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
6+
kotlin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" }
7+
8+
[libraries]
9+
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }

sentry-android-core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ dependencies {
9696
// tests
9797
testImplementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))
9898
testImplementation(Config.TestLibs.robolectric)
99-
testImplementation(Config.TestLibs.kotlinTestJunit)
99+
testImplementation(libs.kotlin.test.junit)
100100
testImplementation(Config.TestLibs.androidxCore)
101101
testImplementation(Config.TestLibs.androidxRunner)
102102
testImplementation(Config.TestLibs.androidxJunit)

sentry-android-fragment/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dependencies {
6969

7070
// tests
7171
testImplementation(Config.Libs.fragment)
72-
testImplementation(Config.TestLibs.kotlinTestJunit)
72+
testImplementation(libs.kotlin.test.junit)
7373
testImplementation(Config.TestLibs.mockitoKotlin)
7474
testImplementation(Config.TestLibs.mockitoInline)
7575
}

sentry-android-integration-tests/sentry-uitest-android-benchmark/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ dependencies {
100100
errorprone(Config.CompileOnly.errorProneNullAway)
101101

102102
androidTestImplementation(projects.sentryTestSupport)
103-
androidTestImplementation(Config.TestLibs.kotlinTestJunit)
103+
androidTestImplementation(libs.kotlin.test.junit)
104104
androidTestImplementation(Config.TestLibs.espressoCore)
105105
androidTestImplementation(Config.TestLibs.androidxTestCoreKtx)
106106
androidTestImplementation(Config.TestLibs.androidxRunner)

sentry-android-integration-tests/sentry-uitest-android/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ dependencies {
116116
errorprone(Config.CompileOnly.errorProneNullAway)
117117

118118
androidTestImplementation(projects.sentryTestSupport)
119-
androidTestImplementation(Config.TestLibs.kotlinTestJunit)
119+
androidTestImplementation(libs.kotlin.test.junit)
120120
androidTestImplementation(Config.TestLibs.espressoCore)
121121
androidTestImplementation(Config.TestLibs.androidxRunner)
122122
androidTestImplementation(Config.TestLibs.androidxTestRules)

sentry-android-navigation/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ dependencies {
7171
// tests
7272
testImplementation(Config.Libs.navigationRuntime)
7373

74-
testImplementation(Config.TestLibs.kotlinTestJunit)
74+
testImplementation(libs.kotlin.test.junit)
7575
testImplementation(Config.TestLibs.mockitoKotlin)
7676
testImplementation(Config.TestLibs.mockitoInline)
7777

sentry-android-ndk/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ dependencies {
8888
compileOnly(Config.CompileOnly.jetbrainsAnnotations)
8989

9090
testImplementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))
91-
testImplementation(Config.TestLibs.kotlinTestJunit)
91+
testImplementation(libs.kotlin.test.junit)
9292
testImplementation(Config.TestLibs.mockitoKotlin)
9393
testImplementation(projects.sentryTestSupport)
9494
}

sentry-android-replay/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ dependencies {
8787
testImplementation(projects.sentryTestSupport)
8888
testImplementation(projects.sentryAndroidCore)
8989
testImplementation(Config.TestLibs.robolectric)
90-
testImplementation(Config.TestLibs.kotlinTestJunit)
90+
testImplementation(libs.kotlin.test.junit)
9191
testImplementation(Config.TestLibs.androidxRunner)
9292
testImplementation(Config.TestLibs.androidxJunit)
9393
testImplementation(Config.TestLibs.mockitoKotlin)

0 commit comments

Comments
 (0)