diff --git a/.cursor/rules/new_module.mdc b/.cursor/rules/new_module.mdc index b9fdde3df6a..77f8e7367fa 100644 --- a/.cursor/rules/new_module.mdc +++ b/.cursor/rules/new_module.mdc @@ -31,16 +31,11 @@ the release that first ships it. All of the following have to be merged **before 2. Add the module to the include list in `settings.gradle.kts` -If adding a `sentry-samples` module, also add it to the `ignoredProjects` list in the root `build.gradle.kts`: - -```kotlin -ignoredProjects.addAll( - listOf( - // ... existing projects ... - "sentry-samples-{module-name}" - ) -) -``` +If adding a sample, add an `include("…")` line for it to `sentry-samples/settings.gradle.kts` +instead, and apply `id("io.sentry.spotless")` and `id("io.sentry.jdk-target")` in its `plugins` +block. The samples are a separate Gradle build that includes the SDK build, so a sample depends on +`"io.sentry:sentry-{module-name}:$sentryVersion"` (with `val sentryVersion = +libs.versions.sentry.get()`), and Gradle substitutes the SDK's project for it. 3. Add a `SENTRY_{MODULE}_SDK_NAME` constant to the `Config.Sentry` block in `buildSrc/src/main/java/Config.kt`: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8e712646a1e..d1593330dd3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,6 +12,7 @@ updates: - "/" - "/sentry-samples/sentry-samples-android" - "/sentry-android-integration-tests" + - "/sentry-samples" registries: - gradle-plugin-portal schedule: diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index c0376a85328..08ba64660e4 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -24,6 +24,8 @@ jobs: path: sentry-samples/sentry-samples-android - name: sentry-android-integration-tests path: sentry-android-integration-tests + - name: sentry-samples + path: sentry-samples steps: - name: Checkout Repo diff --git a/AGENTS.md b/AGENTS.md index 8895b5fb658..5097bf3c1c6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -67,6 +67,9 @@ resolves the per-module test task, including integration test suites, for you. # Build the Android sample, a separate Gradle build that includes this one ./gradlew -p sentry-samples/sentry-samples-android assembleDebug + +# Build the JVM samples, another separate Gradle build that includes this one +./gradlew -p sentry-samples assemble ``` ## Development Workflow Rules @@ -113,7 +116,7 @@ The repository is organized into multiple modules: ### Utility Modules - **`sentry-test-support`** - Shared test utilities, including `MockSentryServer` and envelope matchers -- **`sentry-samples`** - Example applications. `sentry-samples-android` is a separate Gradle build that includes this one, so root tasks such as `check` and `spotlessApply` don't reach it +- **`sentry-samples`** - Example applications, in two separate Gradle builds that include this one: `sentry-samples` (JVM) and `sentry-samples/sentry-samples-android`. Root tasks such as `check` and `spotlessApply` don't reach them, and `sentry-android-integration-tests` is a separate build too - **`sentry-bom`** - Bill of Materials for dependency management ### Key Architectural Patterns diff --git a/Makefile b/Makefile index d88f81d09ab..562eec68140 100644 --- a/Makefile +++ b/Makefile @@ -28,12 +28,14 @@ update: # Spotless formats the code. The root spotlessApply doesn't reach the separate builds. format: ./gradlew spotlessApply + ./gradlew -p sentry-samples spotlessApply ./gradlew -p sentry-samples/sentry-samples-android spotlessApply ./gradlew -p sentry-android-integration-tests spotlessApply # Spotless check's code checkFormat: ./gradlew spotlessJavaCheck spotlessKotlinCheck + ./gradlew -p sentry-samples spotlessJavaCheck spotlessKotlinCheck ./gradlew -p sentry-samples/sentry-samples-android spotlessJavaCheck spotlessKotlinCheck ./gradlew -p sentry-android-integration-tests spotlessJavaCheck spotlessKotlinCheck diff --git a/build.gradle.kts b/build.gradle.kts index fff33104ae9..ed939bea272 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,6 @@ plugins { alias(libs.plugins.kotlin.compose) apply false alias(libs.plugins.errorprone) apply false alias(libs.plugins.gradle.versions) apply false - alias(libs.plugins.spring.dependency.management) apply false id("io.sentry.javadoc.aggregate") alias(libs.plugins.android.application) apply false } @@ -51,9 +50,7 @@ allprojects { tasks.register("buildForCodeQL") { subprojects .filter { - !it.displayName.contains("sample") && - !it.displayName.contains("integration-tests") && - !it.displayName.contains("bom") && + !it.displayName.contains("bom") && it.name != "sentry-opentelemetry" } .forEach { proj -> diff --git a/sentry-samples/build.gradle.kts b/sentry-samples/build.gradle.kts new file mode 100644 index 00000000000..3a344b8e8d2 --- /dev/null +++ b/sentry-samples/build.gradle.kts @@ -0,0 +1,8 @@ +plugins { + alias(libs.plugins.kotlin.jvm) apply false + alias(libs.plugins.kotlin.spring) apply false + alias(libs.plugins.spring.dependency.management) apply false + alias(libs.plugins.gradle.versions) apply false + id("io.sentry.spotless") apply false + id("io.sentry.jdk-target") apply false +} diff --git a/sentry-samples/gradle.properties b/sentry-samples/gradle.properties new file mode 120000 index 00000000000..7677fb73be8 --- /dev/null +++ b/sentry-samples/gradle.properties @@ -0,0 +1 @@ +../gradle.properties \ No newline at end of file diff --git a/sentry-samples/gradle/gradle-daemon-jvm.properties b/sentry-samples/gradle/gradle-daemon-jvm.properties new file mode 120000 index 00000000000..284e270637d --- /dev/null +++ b/sentry-samples/gradle/gradle-daemon-jvm.properties @@ -0,0 +1 @@ +../../gradle/gradle-daemon-jvm.properties \ No newline at end of file diff --git a/sentry-samples/gradle/wrapper b/sentry-samples/gradle/wrapper new file mode 120000 index 00000000000..3232fe4e272 --- /dev/null +++ b/sentry-samples/gradle/wrapper @@ -0,0 +1 @@ +../../gradle/wrapper \ No newline at end of file diff --git a/sentry-samples/gradlew b/sentry-samples/gradlew new file mode 120000 index 00000000000..502f5a2d3ec --- /dev/null +++ b/sentry-samples/gradlew @@ -0,0 +1 @@ +../gradlew \ No newline at end of file diff --git a/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts index 66a965a0fb4..f99e78dd22e 100644 --- a/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-console-opentelemetry-noagent/build.gradle.kts @@ -7,11 +7,13 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.console.Main") } dependencies { - implementation(projects.sentryOpentelemetry.sentryOpentelemetryAgentless) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-opentelemetry-agentless:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") } // Configure the Shadow JAR (executable JAR with all dependencies) diff --git a/sentry-samples/sentry-samples-console-otlp/build.gradle.kts b/sentry-samples/sentry-samples-console-otlp/build.gradle.kts index ee327c288c1..dd0e4a149b2 100644 --- a/sentry-samples/sentry-samples-console-otlp/build.gradle.kts +++ b/sentry-samples/sentry-samples-console-otlp/build.gradle.kts @@ -7,11 +7,13 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.console.Main") } dependencies { - implementation(projects.sentryOpentelemetry.sentryOpentelemetryOtlp) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-opentelemetry-otlp:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.otel.semconv) implementation(libs.otel.semconv.incubating) implementation(libs.otel.exporter.logging) diff --git a/sentry-samples/sentry-samples-console/build.gradle.kts b/sentry-samples/sentry-samples-console/build.gradle.kts index 8abef5c4c11..d70b509a72f 100644 --- a/sentry-samples/sentry-samples-console/build.gradle.kts +++ b/sentry-samples/sentry-samples-console/build.gradle.kts @@ -7,13 +7,15 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.console.Main") } dependencies { - implementation(projects.sentry) - implementation(projects.sentryAsyncProfiler) - implementation(projects.sentryJcache) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") + implementation("io.sentry:sentry-jcache:$sentryVersion") + implementation("io.sentry:sentry-kafka:$sentryVersion") implementation(libs.jcache) implementation(libs.caffeine.jcache) implementation(libs.kafka.clients) diff --git a/sentry-samples/sentry-samples-jul/build.gradle.kts b/sentry-samples/sentry-samples-jul/build.gradle.kts index 6d648c74ed2..5129c48b62a 100644 --- a/sentry-samples/sentry-samples-jul/build.gradle.kts +++ b/sentry-samples/sentry-samples-jul/build.gradle.kts @@ -7,10 +7,12 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.jul.Main") } dependencies { - implementation(projects.sentryJul) + implementation("io.sentry:sentry-jul:$sentryVersion") implementation(libs.slf4j.jdk14) } diff --git a/sentry-samples/sentry-samples-ktor-client/build.gradle.kts b/sentry-samples/sentry-samples-ktor-client/build.gradle.kts index c1704330564..6f31bfe9e48 100644 --- a/sentry-samples/sentry-samples-ktor-client/build.gradle.kts +++ b/sentry-samples/sentry-samples-ktor-client/build.gradle.kts @@ -6,6 +6,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.ktorClient.Main") } configure { @@ -21,8 +23,8 @@ dependencies { implementation(libs.ktor.client.core) implementation(libs.ktor.client.java) implementation(libs.kotlinx.coroutines) - implementation(projects.sentry) - implementation(projects.sentryKtorClient) + implementation("io.sentry:sentry:$sentryVersion") + implementation("io.sentry:sentry-ktor-client:$sentryVersion") } tasks.test { useJUnitPlatform() } diff --git a/sentry-samples/sentry-samples-log4j2/build.gradle.kts b/sentry-samples/sentry-samples-log4j2/build.gradle.kts index 5ead007432d..ea8373c939f 100644 --- a/sentry-samples/sentry-samples-log4j2/build.gradle.kts +++ b/sentry-samples/sentry-samples-log4j2/build.gradle.kts @@ -7,10 +7,12 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.log4j2.Main") } dependencies { - implementation(projects.sentryLog4j2) + implementation("io.sentry:sentry-log4j2:$sentryVersion") implementation(libs.log4j.api) implementation(libs.log4j.core) } diff --git a/sentry-samples/sentry-samples-logback/build.gradle.kts b/sentry-samples/sentry-samples-logback/build.gradle.kts index 6deebda29f2..c3e10054745 100644 --- a/sentry-samples/sentry-samples-logback/build.gradle.kts +++ b/sentry-samples/sentry-samples-logback/build.gradle.kts @@ -7,10 +7,12 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.logback.Main") } dependencies { - implementation(projects.sentryLogback) + implementation("io.sentry:sentry-logback:$sentryVersion") implementation(libs.logback.classic) } diff --git a/sentry-samples/sentry-samples-netflix-dgs/build.gradle.kts b/sentry-samples/sentry-samples-netflix-dgs/build.gradle.kts index f64c52f2d00..097b7dbcccb 100644 --- a/sentry-samples/sentry-samples-netflix-dgs/build.gradle.kts +++ b/sentry-samples/sentry-samples-netflix-dgs/build.gradle.kts @@ -12,6 +12,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.netflix.dgs.NetlixDgsApplication") } group = "io.sentry.sample.spring-boot" @@ -27,8 +29,8 @@ dependencies { implementation(libs.springboot.starter.web) implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarter) - implementation(projects.sentryGraphql) + implementation("io.sentry:sentry-spring-boot-starter:$sentryVersion") + implementation("io.sentry:sentry-graphql:$sentryVersion") implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:4.9.2")) implementation("com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure:4.9.2") implementation("com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter") diff --git a/sentry-samples/sentry-samples-openfeign/build.gradle.kts b/sentry-samples/sentry-samples-openfeign/build.gradle.kts index e19e7478193..de871eb4115 100644 --- a/sentry-samples/sentry-samples-openfeign/build.gradle.kts +++ b/sentry-samples/sentry-samples-openfeign/build.gradle.kts @@ -6,6 +6,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.openfeign.Main") } configure { @@ -14,8 +16,8 @@ configure { } dependencies { - implementation(projects.sentry) - implementation(projects.sentryOpenfeign) + implementation("io.sentry:sentry:$sentryVersion") + implementation("io.sentry:sentry-openfeign:$sentryVersion") implementation(libs.feign.core) implementation(libs.feign.gson) } diff --git a/sentry-samples/sentry-samples-servlet/build.gradle.kts b/sentry-samples/sentry-samples-servlet/build.gradle.kts index 6f4d1ebabe7..5cc8a7e0a4f 100644 --- a/sentry-samples/sentry-samples-servlet/build.gradle.kts +++ b/sentry-samples/sentry-samples-servlet/build.gradle.kts @@ -4,6 +4,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.servlet" version = "0.0.1-SNAPSHOT" @@ -13,7 +15,7 @@ java.sourceCompatibility = JavaVersion.VERSION_1_8 java.targetCompatibility = JavaVersion.VERSION_1_8 dependencies { - implementation(projects.sentryServlet) + implementation("io.sentry:sentry-servlet:$sentryVersion") implementation("javax.servlet:javax.servlet-api:4.0.1") } diff --git a/sentry-samples/sentry-samples-spring-7/build.gradle.kts b/sentry-samples/sentry-samples-spring-7/build.gradle.kts index c9825bda212..e16b85724cc 100644 --- a/sentry-samples/sentry-samples-spring-7/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-7/build.gradle.kts @@ -14,6 +14,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.spring7.Main") } // Ensure WAR is up to date before run task @@ -38,9 +40,9 @@ dependencies { implementation("org.springframework.security:spring-security-config") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpring7) - implementation(projects.sentryLogback) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-7:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.jackson.databind) implementation(libs.logback.classic) implementation(libs.servlet.jakarta.api) diff --git a/sentry-samples/sentry-samples-spring-boot-4-log4j2/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-log4j2/build.gradle.kts index eab14e55247..6564d2899ca 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-log4j2/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-log4j2/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-4-log4j2" version = "0.0.1-SNAPSHOT" @@ -41,12 +43,12 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBoot4Starter) - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-4-starter:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") - implementation(projects.sentryLog4j2) + implementation("io.sentry:sentry-log4j2:$sentryVersion") implementation("org.springframework.boot:spring-boot-starter-log4j2") modules { module("org.springframework.boot:spring-boot-starter-logging") { @@ -63,9 +65,9 @@ dependencies { // kafka implementation(libs.springboot4.starter.kafka) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts index 0f3479ee6b1..57a81dc707b 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-4" version = "0.0.1-SNAPSHOT" @@ -41,19 +43,19 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBoot4Starter) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) - implementation(projects.sentryOpentelemetry.sentryOpentelemetryAgentlessSpring) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-4-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-opentelemetry-agentless-spring:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") // kafka implementation(libs.springboot4.starter.kafka) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts index 7b92e24a462..f20af05ccf1 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-opentelemetry/build.gradle.kts @@ -11,6 +11,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-4" version = "0.0.1-SNAPSHOT" @@ -42,23 +44,23 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBoot4Starter) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-4-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.otel) // kafka implementation(libs.springboot4.starter.kafka) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // cache tracing implementation(libs.springboot4.starter.cache) implementation(libs.caffeine) // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } @@ -69,9 +71,8 @@ tasks.register("bootRunWithAgent").configure { mainClass = mainBootRunTask.mainClass classpath = mainBootRunTask.classpath - val versionName = project.properties["versionName"] as String val agentJarPath = - "$rootDir/sentry-opentelemetry/sentry-opentelemetry-agent/build/libs/sentry-opentelemetry-agent-$versionName.jar" + "$rootDir/../sentry-opentelemetry/sentry-opentelemetry-agent/build/libs/sentry-opentelemetry-agent-$sentryVersion.jar" val dsn = System.getenv("SENTRY_DSN") diff --git a/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts index 88f82666c5d..016f1c70b30 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-otlp/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-4-otlp" version = "0.0.1-SNAPSHOT" @@ -41,19 +43,19 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBoot4Starter) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) - implementation(projects.sentryOpentelemetry.sentryOpentelemetryOtlpSpring) + implementation("io.sentry:sentry-spring-boot-4-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") + implementation("io.sentry:sentry-opentelemetry-otlp-spring:$sentryVersion") // cache tracing implementation(libs.springboot4.starter.cache) implementation(libs.caffeine) // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts index 942b70d491d..23140a7b21d 100644 --- a/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4-webflux/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-4-webflux" version = "0.0.1-SNAPSHOT" @@ -17,11 +19,11 @@ version = "0.0.1-SNAPSHOT" dependencies { implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBoot4Starter) - implementation(projects.sentryLogback) - implementation(projects.sentryJdbc) - implementation(projects.sentryGraphql22) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-4-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-jdbc:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.context.propagation) implementation(libs.springboot4.starter.actuator) implementation(libs.springboot4.starter.graphql) diff --git a/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts index 2059633409f..77393c9b36c 100644 --- a/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-4/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-4" version = "0.0.1-SNAPSHOT" @@ -41,11 +43,11 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBoot4Starter) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-4-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") // cache tracing implementation(libs.springboot4.starter.cache) @@ -53,13 +55,13 @@ dependencies { // kafka implementation(libs.springboot4.starter.kafka) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // okhttp client instrumentation - implementation(projects.sentryOkhttp) + implementation("io.sentry:sentry-okhttp:$sentryVersion") implementation(libs.okhttp) // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta-log4j2/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta-log4j2/build.gradle.kts index 0c57e1259f1..0e8e2069b06 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta-log4j2/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta-log4j2/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-jakarta-log4j2" version = "0.0.1-SNAPSHOT" @@ -43,8 +45,8 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarterJakarta) - implementation(projects.sentryLog4j2) + implementation("io.sentry:sentry-spring-boot-starter-jakarta:$sentryVersion") + implementation("io.sentry:sentry-log4j2:$sentryVersion") implementation("org.springframework.boot:spring-boot-starter-log4j2") modules { module("org.springframework.boot:spring-boot-starter-logging") { @@ -54,10 +56,10 @@ dependencies { ) } } - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) - implementation(projects.sentryOpenfeature) + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") + implementation("io.sentry:sentry-openfeature:$sentryVersion") // cache tracing implementation(libs.springboot3.starter.cache) @@ -65,12 +67,12 @@ dependencies { // kafka implementation(libs.spring.kafka3) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // OpenFeature SDK implementation(libs.openfeature) // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts index 757bbda8fb1..12b86dcc6b5 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry-noagent/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-jakarta" version = "0.0.1-SNAPSHOT" @@ -44,22 +46,22 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarterJakarta) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) - implementation(projects.sentryOpentelemetry.sentryOpentelemetryAgentlessSpring) + implementation("io.sentry:sentry-spring-boot-starter-jakarta:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") + implementation("io.sentry:sentry-opentelemetry-agentless-spring:$sentryVersion") // kafka implementation(libs.spring.kafka3) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // cache tracing implementation(libs.springboot3.starter.cache) implementation(libs.caffeine) // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts index 9e6201fd6a1..0ba3ebf83c4 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/build.gradle.kts @@ -11,6 +11,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-jakarta" version = "0.0.1-SNAPSHOT" @@ -44,23 +46,23 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarterJakarta) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) + implementation("io.sentry:sentry-spring-boot-starter-jakarta:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") implementation(libs.otel) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-async-profiler:$sentryVersion") // kafka implementation(libs.spring.kafka3) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // cache tracing implementation(libs.springboot3.starter.cache) implementation(libs.caffeine) // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } @@ -71,9 +73,8 @@ tasks.register("bootRunWithAgent").configure { mainClass = mainBootRunTask.mainClass classpath = mainBootRunTask.classpath - val versionName = project.properties["versionName"] as String val agentJarPath = - "$rootDir/sentry-opentelemetry/sentry-opentelemetry-agent/build/libs/sentry-opentelemetry-agent-$versionName.jar" + "$rootDir/../sentry-opentelemetry/sentry-opentelemetry-agent/build/libs/sentry-opentelemetry-agent-$sentryVersion.jar" val dsn = System.getenv("SENTRY_DSN") diff --git a/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts index 63f9b1799b8..fedd8086ded 100644 --- a/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-jakarta/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-jakarta" version = "0.0.1-SNAPSHOT" @@ -43,12 +45,12 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarterJakarta) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql22) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) - implementation(projects.sentryOpenfeature) + implementation("io.sentry:sentry-spring-boot-starter-jakarta:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") + implementation("io.sentry:sentry-openfeature:$sentryVersion") // cache tracing implementation(libs.springboot3.starter.cache) @@ -56,16 +58,16 @@ dependencies { // kafka implementation(libs.spring.kafka3) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // OpenFeature SDK implementation(libs.openfeature) // okhttp client instrumentation - implementation(projects.sentryOkhttp) + implementation("io.sentry:sentry-okhttp:$sentryVersion") implementation(libs.okhttp) // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts index fafda035855..97ba9a0ac48 100644 --- a/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-opentelemetry-noagent/build.gradle.kts @@ -12,6 +12,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + // Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version // the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the // toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test @@ -50,18 +52,18 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarter) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql) - implementation(projects.sentryQuartz) - implementation(projects.sentryOpentelemetry.sentryOpentelemetryAgentlessSpring) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-opentelemetry-agentless-spring:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.spring.kafka2) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts index 5e5ceb5eafd..bd2e68e334b 100644 --- a/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-opentelemetry/build.gradle.kts @@ -12,6 +12,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + // Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version // the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the // toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test @@ -49,18 +51,18 @@ dependencies { implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarter) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.otel) implementation(libs.spring.kafka2) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } @@ -92,9 +94,8 @@ tasks.register("bootRunWithAgent").configure { mainClass.set("io.sentry.samples.spring.boot.SentryDemoApplication") classpath = sourceSets["main"].runtimeClasspath - val versionName = project.properties["versionName"] as String val agentJarPath = - "$rootDir/sentry-opentelemetry/sentry-opentelemetry-agent/build/libs/sentry-opentelemetry-agent-$versionName.jar" + "$rootDir/../sentry-opentelemetry/sentry-opentelemetry-agent/build/libs/sentry-opentelemetry-agent-$sentryVersion.jar" val dsn = System.getenv("SENTRY_DSN") diff --git a/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts index eba13d006fd..50c1b85a197 100644 --- a/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-webflux-jakarta/build.gradle.kts @@ -10,6 +10,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + group = "io.sentry.sample.spring-boot-webflux-jakarta" version = "0.0.1-SNAPSHOT" @@ -26,11 +28,11 @@ extra["kotlin-coroutines.version"] = "1.9.0" dependencies { implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarterJakarta) - implementation(projects.sentryLogback) - implementation(projects.sentryJdbc) - implementation(projects.sentryGraphql22) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-starter-jakarta:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-jdbc:$sentryVersion") + implementation("io.sentry:sentry-graphql-22:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.context.propagation) implementation(libs.springboot3.starter.actuator) implementation(libs.springboot3.starter.graphql) diff --git a/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts index 2726fdb076c..f066a9dc9e0 100644 --- a/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot-webflux/build.gradle.kts @@ -12,6 +12,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + // Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version // the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the // toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test @@ -35,10 +37,10 @@ dependencies { implementation(libs.springboot.starter.webflux) implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarter) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") } val runtimeClasspath = configurations.named("runtimeClasspath") diff --git a/sentry-samples/sentry-samples-spring-boot/build.gradle.kts b/sentry-samples/sentry-samples-spring-boot/build.gradle.kts index f1c71766f57..234b2bcc869 100644 --- a/sentry-samples/sentry-samples-spring-boot/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-boot/build.gradle.kts @@ -12,6 +12,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + // Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version // the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the // toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test @@ -50,22 +52,22 @@ dependencies { implementation(libs.caffeine) implementation(libs.spring.kafka2) - implementation(projects.sentryKafka) + implementation("io.sentry:sentry-kafka:$sentryVersion") implementation("org.aspectj:aspectjweaver") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8", getKotlinPluginVersion())) - implementation(projects.sentrySpringBootStarter) - implementation(projects.sentryLogback) - implementation(projects.sentryGraphql) - implementation(projects.sentryQuartz) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-boot-starter:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-graphql:$sentryVersion") + implementation("io.sentry:sentry-quartz:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") // okhttp client instrumentation - implementation(projects.sentryOkhttp) + implementation("io.sentry:sentry-okhttp:$sentryVersion") implementation(libs.okhttp) // database query tracing - implementation(projects.sentryJdbc) + implementation("io.sentry:sentry-jdbc:$sentryVersion") runtimeOnly(libs.hsqldb) } diff --git a/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts b/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts index d189bec4c84..4c9771ea576 100644 --- a/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring-jakarta/build.gradle.kts @@ -11,6 +11,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + application { mainClass.set("io.sentry.samples.spring.jakarta.Main") } // Ensure WAR is up to date before run task @@ -36,9 +38,9 @@ dependencies { implementation("org.springframework.security:spring-security-config") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8")) - implementation(projects.sentrySpringJakarta) - implementation(projects.sentryLogback) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring-jakarta:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.jackson.databind) implementation(libs.logback.classic) implementation(libs.servlet.jakarta.api) diff --git a/sentry-samples/sentry-samples-spring/build.gradle.kts b/sentry-samples/sentry-samples-spring/build.gradle.kts index 4ef973725e9..ffb672b8648 100644 --- a/sentry-samples/sentry-samples-spring/build.gradle.kts +++ b/sentry-samples/sentry-samples-spring/build.gradle.kts @@ -11,6 +11,8 @@ plugins { id("io.sentry.jdk-target") } +val sentryVersion = libs.versions.sentry.get() + // Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version // the Spring Boot 2.x matrix covers (2.4.13, Spring 5.3.13) fails on class files as new as the // toolchain's: "Unsupported class file major version 65". Only the app is scanned, so its test @@ -47,9 +49,9 @@ dependencies { implementation("org.springframework.security:spring-security-config") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation(kotlin("stdlib-jdk8")) - implementation(projects.sentrySpring) - implementation(projects.sentryLogback) - implementation(projects.sentryAsyncProfiler) + implementation("io.sentry:sentry-spring:$sentryVersion") + implementation("io.sentry:sentry-logback:$sentryVersion") + implementation("io.sentry:sentry-async-profiler:$sentryVersion") implementation(libs.jackson.databind) implementation(libs.logback.classic) implementation(libs.servlet.api) diff --git a/sentry-samples/settings.gradle.kts b/sentry-samples/settings.gradle.kts new file mode 100644 index 00000000000..ad2fe3e3db6 --- /dev/null +++ b/sentry-samples/settings.gradle.kts @@ -0,0 +1,68 @@ +pluginManagement { + repositories { + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("com.gradle.develocity") version "4.6.1" + id("com.gradle.common-custom-user-data-gradle-plugin") version "2.8.0" +} + +develocity { + buildScan { + termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use") + termsOfUseAgree.set("yes") + } +} + +dependencyResolutionManagement { + repositories { + mavenCentral() + mavenLocal() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + // gradle.properties links to the SDK build's, so versionName is the SDK version. + version("sentry", providers.gradleProperty("versionName").get()) + } + } +} + +rootProject.name = "sentry-samples" + +includeBuild("..") + +// For the io.sentry.spotless and io.sentry.jdk-target convention plugins. +includeBuild("../build-logic") + +include("sentry-samples-console") +include("sentry-samples-console-opentelemetry-noagent") +include("sentry-samples-console-otlp") +include("sentry-samples-jul") +include("sentry-samples-ktor-client") +include("sentry-samples-log4j2") +include("sentry-samples-logback") +include("sentry-samples-netflix-dgs") +include("sentry-samples-openfeign") +include("sentry-samples-servlet") +include("sentry-samples-spring") +include("sentry-samples-spring-7") +include("sentry-samples-spring-boot") +include("sentry-samples-spring-boot-4") +include("sentry-samples-spring-boot-4-log4j2") +include("sentry-samples-spring-boot-4-opentelemetry") +include("sentry-samples-spring-boot-4-opentelemetry-noagent") +include("sentry-samples-spring-boot-4-otlp") +include("sentry-samples-spring-boot-4-webflux") +include("sentry-samples-spring-boot-jakarta") +include("sentry-samples-spring-boot-jakarta-log4j2") +include("sentry-samples-spring-boot-jakarta-opentelemetry") +include("sentry-samples-spring-boot-jakarta-opentelemetry-noagent") +include("sentry-samples-spring-boot-opentelemetry") +include("sentry-samples-spring-boot-opentelemetry-noagent") +include("sentry-samples-spring-boot-webflux") +include("sentry-samples-spring-boot-webflux-jakarta") +include("sentry-samples-spring-jakarta") diff --git a/settings.gradle.kts b/settings.gradle.kts index aae18edb922..852765c03d8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -102,33 +102,5 @@ include( "sentry-launchdarkly-android", "sentry-reactor", "sentry-async-profiler", - "sentry-ktor-client", - "sentry-samples:sentry-samples-console", - "sentry-samples:sentry-samples-console-otlp", - "sentry-samples:sentry-samples-console-opentelemetry-noagent", - "sentry-samples:sentry-samples-jul", - "sentry-samples:sentry-samples-ktor-client", - "sentry-samples:sentry-samples-log4j2", - "sentry-samples:sentry-samples-logback", - "sentry-samples:sentry-samples-servlet", - "sentry-samples:sentry-samples-spring", - "sentry-samples:sentry-samples-spring-jakarta", - "sentry-samples:sentry-samples-spring-7", - "sentry-samples:sentry-samples-spring-boot", - "sentry-samples:sentry-samples-spring-boot-opentelemetry", - "sentry-samples:sentry-samples-spring-boot-opentelemetry-noagent", - "sentry-samples:sentry-samples-spring-boot-jakarta", - "sentry-samples:sentry-samples-spring-boot-jakarta-log4j2", - "sentry-samples:sentry-samples-spring-boot-jakarta-opentelemetry", - "sentry-samples:sentry-samples-spring-boot-jakarta-opentelemetry-noagent", - "sentry-samples:sentry-samples-spring-boot-webflux", - "sentry-samples:sentry-samples-spring-boot-webflux-jakarta", - "sentry-samples:sentry-samples-spring-boot-4", - "sentry-samples:sentry-samples-spring-boot-4-log4j2", - "sentry-samples:sentry-samples-spring-boot-4-opentelemetry", - "sentry-samples:sentry-samples-spring-boot-4-opentelemetry-noagent", - "sentry-samples:sentry-samples-spring-boot-4-otlp", - "sentry-samples:sentry-samples-spring-boot-4-webflux", - "sentry-samples:sentry-samples-netflix-dgs", - "sentry-samples:sentry-samples-openfeign" + "sentry-ktor-client" )