Skip to content

Commit 175e10b

Browse files
runningcodeclaude
andcommitted
build(samples): Read the sample's SDK version through the catalog
The sample's settings now add versionName to the catalog as libs.versions.sentry, as the other separate builds do, and use the root build's Develocity plugin version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6d06ad6 commit 175e10b

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎sentry-samples/sentry-samples-android/build.gradle.kts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ plugins {
1818
alias(libs.plugins.sqldelight)
1919
}
2020

21-
// gradle.properties links to the SDK build's, so this is the SDK version.
22-
val sentryVersion = providers.gradleProperty("versionName").get()
21+
val sentryVersion = libs.versions.sentry.get()
2322

2423
if (providers.gradleProperty("useSagp").isPresent) {
2524
apply(plugin = "io.sentry.android.gradle")

‎sentry-samples/sentry-samples-android/settings.gradle.kts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pluginManagement {
3333
}
3434

3535
plugins {
36-
id("com.gradle.develocity") version "4.5.0"
36+
id("com.gradle.develocity") version "4.6.1"
3737
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.8.0"
3838
}
3939

@@ -50,7 +50,13 @@ dependencyResolutionManagement {
5050
mavenCentral()
5151
mavenLocal()
5252
}
53-
versionCatalogs { create("libs") { from(files("../../gradle/libs.versions.toml")) } }
53+
versionCatalogs {
54+
create("libs") {
55+
from(files("../../gradle/libs.versions.toml"))
56+
// gradle.properties links to the SDK build's, so versionName is the SDK version.
57+
version("sentry", providers.gradleProperty("versionName").get())
58+
}
59+
}
5460
}
5561

5662
rootProject.name = "sentry-samples-android"

0 commit comments

Comments
 (0)