Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
- Android: Attachments on the scope will now be synced to native ([#5211](https://github.com/getsentry/sentry-java/pull/5211))
- Add THIRD_PARTY_NOTICES.md for vendored third-party code, bundled as SENTRY_THIRD_PARTY_NOTICES.md in the sentry JAR under META-INF ([#5186](https://github.com/getsentry/sentry-java/pull/5186))

### Dependencies

- Bump Gradle from v8.14.3 to v9.4.1 ([#5063](https://github.com/getsentry/sentry-java/pull/5063))
- [changelog](https://github.com/gradle/gradle/blob/master/CHANGELOG.md#v941)
- [diff](https://github.com/gradle/gradle/compare/v8.14.3...v9.4.1)

## 8.37.1

### Fixes
Expand Down
8 changes: 6 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ tasks.register("buildForCodeQL") {
}
.forEach { proj ->
if (proj.plugins.hasPlugin("com.android.library")) {
this.dependsOn(proj.tasks.findByName("compileReleaseUnitTestSources"))
proj.tasks.findByName("compileReleaseUnitTestSources")?.let { testTask ->
this.dependsOn(testTask)
}
} else {
this.dependsOn(proj.tasks.findByName("testClasses"))
proj.tasks.findByName("testClasses")?.let { testTask ->
this.dependsOn(testTask)
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import java.math.BigDecimal

object Config {
val AGP = System.getenv("VERSION_AGP") ?: "8.6.0"
val AGP = System.getenv("VERSION_AGP") ?: "8.13.1"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGP 8.13.1 incompatible with Gradle 9.4.1

High Severity

The default AGP version was bumped to 8.13.1, but AGP 8.x is only supported with Gradle 8.x. With the Gradle wrapper now at 9.4.1, the Android build modules will fail because AGP 8.13.x requires Gradle 8.13 and is not compatible with Gradle 9. Only AGP 9.x (e.g., 9.0.x or 9.1.x) is supported with Gradle 9.x. The same applies to the android.experimental.lint.version=8.13.1 in gradle.properties.

Additional Locations (1)
Fix in Cursor Fix in Web

val kotlinStdLib = "stdlib-jdk8"
val kotlinStdLibVersionAndroid = "1.9.24"
val kotlinTestJunit = "test-junit"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled

# AndroidX required by AGP >= 3.6.x
android.useAndroidX=true
android.experimental.lint.version=8.9.0
android.experimental.lint.version=8.13.1

# Release information
versionName=8.37.1
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version = "0.3
springboot2 = { id = "org.springframework.boot", version.ref = "springboot2" }
springboot3 = { id = "org.springframework.boot", version.ref = "springboot3" }
springboot4 = { id = "org.springframework.boot", version.ref = "springboot4" }
spring-dependency-management = { id = "io.spring.dependency-management", version = "1.0.11.RELEASE" }
spring-dependency-management = { id = "io.spring.dependency-management", version = "1.1.7" }
gretty = { id = "org.gretty", version = "4.0.0" }
animalsniffer = { id = "ru.vyarus.animalsniffer", version = "2.0.1" }
sentry = { id = "io.sentry.android.gradle", version = "6.0.0-alpha.6"}
shadow = { id = "com.gradleup.shadow", version = "8.3.6" }

[libraries]
apache-httpclient = { module = "org.apache.httpcomponents.client5:httpclient5", version = "5.0.4" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
`java-library`
id("io.sentry.javadoc")
id("com.gradleup.shadow") version "8.3.6"
alias(libs.plugins.shadow)
}

fun relocatePackages(shadowJar: ShadowJar) {
Expand Down Expand Up @@ -133,7 +133,7 @@ tasks {
// each CopySpec has
// its own duplicatesStrategy
register("isolateJavaagentLibs", Copy::class.java) {
dependsOn(findByName("relocateJavaagentLibs"))
findByName("relocateJavaagentLibs")?.let { task -> dependsOn(task) }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent null-safety with !! after ?.let guard

Low Severity

The dependsOn calls use findByName(...)?.let to safely handle a potentially null task, but the very next line calls findByName(...)!! on the same task name, which would throw a NullPointerException if the task didn't exist. The null-safety on dependsOn is rendered meaningless since the subsequent !! assertion would crash first. Both occurrences (for relocateJavaagentLibs and isolateJavaagentLibs) follow this contradictory pattern.

Additional Locations (1)
Fix in Cursor Fix in Web

with(isolateClasses(findByName("relocateJavaagentLibs")!!.outputs.files))

into(project.layout.buildDirectory.file("isolated/javaagentLibs").get().asFile)
Expand All @@ -145,7 +145,7 @@ tasks {
named("shadowJar", ShadowJar::class) {
configurations = listOf(bootstrapLibs) + listOf(upstreamAgent)

dependsOn(findByName("isolateJavaagentLibs"))
findByName("isolateJavaagentLibs")?.let { task -> dependsOn(task) }
from(findByName("isolateJavaagentLibs")!!.outputs)

archiveClassifier.set("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
application
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.gradle.versions)
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

application { mainClass.set("io.sentry.samples.console.Main") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
application
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.gradle.versions)
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

application { mainClass.set("io.sentry.samples.console.Main") }
Expand Down
2 changes: 1 addition & 1 deletion sentry-samples/sentry-samples-console/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
application
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.gradle.versions)
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

application { mainClass.set("io.sentry.samples.console.Main") }
Expand Down
2 changes: 1 addition & 1 deletion sentry-samples/sentry-samples-jul/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
application
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.gradle.versions)
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

application { mainClass.set("io.sentry.samples.jul.Main") }
Expand Down
2 changes: 1 addition & 1 deletion sentry-samples/sentry-samples-log4j2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
application
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.gradle.versions)
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

application { mainClass.set("io.sentry.samples.log4j2.Main") }
Expand Down
2 changes: 1 addition & 1 deletion sentry-samples/sentry-samples-logback/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
application
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.gradle.versions)
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

application { mainClass.set("io.sentry.samples.logback.Main") }
Expand Down
4 changes: 2 additions & 2 deletions sentry-system-test-support/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
jacoco
alias(libs.plugins.errorprone)
alias(libs.plugins.gradle.versions)
id("com.apollographql.apollo3") version "3.8.2"
id("com.apollographql.apollo") version "4.1.1"
}

configure<JavaPluginExtension> {
Expand All @@ -22,7 +22,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
dependencies {
api(projects.sentry)
api(projects.sentryTestSupport)
api(libs.apollo3.kotlin)
api(libs.apollo4.kotlin)

compileOnly(libs.jetbrains.annotations)
compileOnly(libs.nopen.annotations)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.sentry.systemtest.graphql

import com.apollographql.apollo3.ApolloClient
import com.apollographql.apollo3.api.ApolloResponse
import com.apollographql.apollo3.api.Mutation
import com.apollographql.apollo3.api.Query
import com.apollographql.apollo.ApolloClient
import com.apollographql.apollo.api.ApolloResponse
import com.apollographql.apollo.api.Mutation
import com.apollographql.apollo.api.Query
import io.sentry.samples.graphql.AddProjectMutation
import io.sentry.samples.graphql.GreetingQuery
import io.sentry.samples.graphql.ProjectQuery
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.sentry.systemtest.util

import com.apollographql.apollo3.api.ApolloResponse
import com.apollographql.apollo3.api.Operation
import com.apollographql.apollo.api.ApolloResponse
import com.apollographql.apollo.api.Operation
import io.sentry.JsonSerializer
import io.sentry.ProfileChunk
import io.sentry.SentryEnvelopeHeader
Expand Down