Skip to content

Commit a5ea4a1

Browse files
authored
Merge branch 'main' into markushi/fix/stretched-dialogs-sr
2 parents 2d3d7fe + 0e20a03 commit a5ea4a1

File tree

111 files changed

+1822
-1661
lines changed

Some content is hidden

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

111 files changed

+1822
-1661
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ distributions/
2020
sentry-spring-boot-starter-jakarta/src/main/resources/META-INF/spring.factories
2121
sentry-samples/sentry-samples-spring-boot-jakarta/spy.log
2222
spy.log
23-
buildSrc/.kotlin/
23+
.kotlin

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,61 @@
44

55
### Fixes
66

7+
- Send UI Profiling app start chunk when it finishes ([#4423](https://github.com/getsentry/sentry-java/pull/4423))
8+
- Republish Javadoc [#4457](https://github.com/getsentry/sentry-java/pull/4457)
9+
- Finalize `OkHttpEvent` even if no active span in `SentryOkHttpInterceptor` [#4469](https://github.com/getsentry/sentry-java/pull/4469)
710
- Correctly capture Dialogs and non full-sized windows ([#4354](https://github.com/getsentry/sentry-java/pull/4354))
811

12+
## 8.13.2
13+
14+
### Fixes
15+
16+
- Don't apply Spring Boot plugin in `sentry-spring-boot-jakarta` ([#4456](https://github.com/getsentry/sentry-java/pull/4456))
17+
- The jar for `io.sentry:sentry-spring-boot-jakarta` is now correctly being built and published to Maven Central.
18+
19+
## 8.13.1
20+
21+
### Fixes
22+
23+
- Fix `SentryAndroid.init` crash if SDK is initialized from a background thread while an `Activity` is in resumed state ([#4449](https://github.com/getsentry/sentry-java/pull/4449))
24+
25+
### Dependencies
26+
27+
- Bump Gradle from v8.14 to v8.14.1 ([#4437](https://github.com/getsentry/sentry-java/pull/4437))
28+
- [changelog](https://github.com/gradle/gradle/blob/master/CHANGELOG.md#v8141)
29+
- [diff](https://github.com/gradle/gradle/compare/v8.14...v8.14.1)
30+
31+
## 8.13.0
32+
933
### Features
1034

1135
- Add debug mode for Session Replay masking ([#4357](https://github.com/getsentry/sentry-java/pull/4357))
1236
- Use `Sentry.replay().enableDebugMaskingOverlay()` to overlay the screen with the Session Replay masks.
1337
- The masks will be invalidated at most once per `frameRate` (default 1 fps).
38+
- Extend Logs API to allow passing in `attributes` ([#4402](https://github.com/getsentry/sentry-java/pull/4402))
39+
- `Sentry.logger.log` now takes a `SentryLogParameters`
40+
- Use `SentryLogParameters.create(SentryAttributes.of(...))` to pass attributes
41+
- Attribute values may be of type `string`, `boolean`, `integer` or `double`.
42+
- Other types will be converted to `string`. Currently we simply call `toString()` but we might offer more in the future.
43+
- You may manually flatten complex types into multiple separate attributes of simple types.
44+
- e.g. intead of `SentryAttribute.named("point", Point(10, 20))` you may store it as `SentryAttribute.integerAttribute("point.x", point.x)` and `SentryAttribute.integerAttribute("point.y", point.y)`
45+
- `SentryAttribute.named()` will automatically infer the type or fall back to `string`.
46+
- `SentryAttribute.booleanAttribute()` takes a `Boolean` value
47+
- `SentryAttribute.integerAttribute()` takes a `Integer` value
48+
- `SentryAttribute.doubleAttribute()` takes a `Double` value
49+
- `SentryAttribute.stringAttribute()` takes a `String` value
50+
- We opted for handling parameters via `SentryLogParameters` to avoid creating tons of overloads that are ambiguous.
51+
52+
### Fixes
53+
54+
- Isolation scope is now forked in `OtelSentrySpanProcessor` instead of `OtelSentryPropagator` ([#4434](https://github.com/getsentry/sentry-java/pull/4434))
55+
- Since propagator may never be invoked we moved the location where isolation scope is forked.
56+
- Not invoking `OtelSentryPropagator.extract` or having a `sentry-trace` header that failed to parse would cause isolation scope not to be forked.
57+
- This in turn caused data to bleed between scopes, e.g. from one request into another
58+
59+
### Dependencies
60+
61+
- Bump Spring Boot to `3.5.0` ([#4111](https://github.com/getsentry/sentry-java/pull/4111))
1462

1563
## 8.12.0
1664

build-logic/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
repositories {
6+
gradlePluginPortal()
7+
}

build-logic/settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "build-logic"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import io.sentry.gradle.AggregateJavadoc
2+
import org.gradle.api.attributes.Category
3+
import org.gradle.api.attributes.LibraryElements
4+
import org.gradle.kotlin.dsl.creating
5+
import org.gradle.kotlin.dsl.getValue
6+
import org.gradle.kotlin.dsl.named
7+
8+
val javadocPublisher by configurations.creating {
9+
isCanBeConsumed = false
10+
isCanBeResolved = true
11+
attributes {
12+
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
13+
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named("javadoc"))
14+
}
15+
}
16+
17+
subprojects {
18+
javadocPublisher.dependencies.add(dependencies.create(this))
19+
}
20+
21+
val javadocCollection = javadocPublisher.incoming.artifactView { lenient(true) }.files
22+
23+
tasks.register("aggregateJavadoc", AggregateJavadoc::class) {
24+
group = "documentation"
25+
description = "Aggregates Javadocs from all subprojects into a single directory."
26+
javadocFiles.set(javadocCollection)
27+
rootDir.set(layout.projectDirectory)
28+
outputDir.set(layout.buildDirectory.dir("docs/javadoc"))
29+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
val javadocConfig: Configuration by configurations.creating {
2+
isCanBeResolved = false
3+
isCanBeConsumed = true
4+
5+
attributes {
6+
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
7+
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named("javadoc"))
8+
}
9+
}
10+
11+
tasks.withType<Javadoc>().configureEach {
12+
setDestinationDir(project.layout.buildDirectory.file("docs/javadoc").get().asFile)
13+
title = "${project.name} $version API"
14+
val opts = options as StandardJavadocDocletOptions
15+
opts.quiet()
16+
opts.encoding = "UTF-8"
17+
opts.memberLevel = JavadocMemberLevel.PROTECTED
18+
opts.links = listOf(
19+
"https://docs.oracle.com/javase/8/docs/api/",
20+
"https://docs.spring.io/spring-framework/docs/current/javadoc-api/",
21+
"https://docs.spring.io/spring-boot/docs/current/api/"
22+
)
23+
}
24+
25+
artifacts {
26+
add(javadocConfig.name, tasks.named("javadoc"))
27+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package io.sentry.gradle
2+
3+
import org.gradle.api.DefaultTask
4+
import org.gradle.api.file.DirectoryProperty
5+
import org.gradle.api.file.FileCollection
6+
import org.gradle.api.file.FileSystemOperations
7+
import org.gradle.api.provider.Property
8+
import org.gradle.api.tasks.InputFiles
9+
import org.gradle.api.tasks.Internal
10+
import org.gradle.api.tasks.OutputDirectory
11+
import org.gradle.api.tasks.TaskAction
12+
import javax.inject.Inject
13+
14+
abstract class AggregateJavadoc @Inject constructor(
15+
@get:Internal val fs: FileSystemOperations
16+
) : DefaultTask() {
17+
@get:InputFiles
18+
abstract val javadocFiles: Property<FileCollection>
19+
20+
// Marked as Internal since this is only used to relativize the paths for the output directories
21+
@get:Internal
22+
abstract val rootDir: DirectoryProperty
23+
24+
@get:OutputDirectory
25+
abstract val outputDir: DirectoryProperty
26+
27+
@TaskAction
28+
fun aggregate() {
29+
javadocFiles.get().forEach { file ->
30+
fs.copy {
31+
// Get the relative path of the project directory to the root directory
32+
val relativePath = file.relativeTo(rootDir.get().asFile)
33+
// Remove the 'build/docs/javadoc' part from the path
34+
val projectPath = relativePath.path.replace("build/docs/javadoc", "")
35+
from(file)
36+
// Use the project name as the output directory name so that each javadoc goes into its own directory
37+
into(outputDir.get().file(projectPath))
38+
}
39+
}
40+
}
41+
}

build.gradle.kts

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ plugins {
2727
alias(libs.plugins.errorprone) apply false
2828
alias(libs.plugins.gradle.versions) apply false
2929
alias(libs.plugins.spring.dependency.management) apply false
30+
id("io.sentry.javadoc.aggregate")
3031
}
3132

3233
buildscript {
@@ -39,7 +40,7 @@ buildscript {
3940
// add classpath of sentry android gradle plugin
4041
// classpath("io.sentry:sentry-android-gradle-plugin:{version}")
4142

42-
classpath(Config.BuildPlugins.commonsCompressOverride)
43+
classpath(libs.commons.compress)
4344
}
4445
}
4546

@@ -237,7 +238,7 @@ spotless {
237238
kotlin {
238239
target("**/*.kt")
239240
ktlint()
240-
targetExclude("**/sentry-native/**")
241+
targetExclude("**/sentry-native/**", "**/build/**")
241242
}
242243
kotlinGradle {
243244
target("**/*.kts")
@@ -246,31 +247,6 @@ spotless {
246247
}
247248
}
248249

249-
tasks.register("aggregateJavadocs", Javadoc::class.java) {
250-
setDestinationDir(project.layout.buildDirectory.file("docs/javadoc").get().asFile)
251-
title = "${project.name} $version API"
252-
val opts = options as StandardJavadocDocletOptions
253-
opts.quiet()
254-
opts.encoding = "UTF-8"
255-
opts.memberLevel = JavadocMemberLevel.PROTECTED
256-
opts.stylesheetFile(file("$projectDir/docs/stylesheet.css"))
257-
opts.links = listOf(
258-
"https://docs.oracle.com/javase/8/docs/api/",
259-
"https://docs.spring.io/spring-framework/docs/current/javadoc-api/",
260-
"https://docs.spring.io/spring-boot/docs/current/api/"
261-
)
262-
subprojects
263-
.filter { !it.name.contains("sample") && !it.name.contains("integration-tests") }
264-
.forEach { proj ->
265-
proj.tasks.withType<Javadoc>().forEach { javadocTask ->
266-
source += javadocTask.source
267-
classpath += javadocTask.classpath
268-
excludes += javadocTask.excludes
269-
includes += javadocTask.includes
270-
}
271-
}
272-
}
273-
274250
tasks.register("buildForCodeQL") {
275251
subprojects
276252
.filter {

0 commit comments

Comments
 (0)