Skip to content

Commit 536d522

Browse files
committed
Merge branch 'main' into feat/user-feedback-widget
2 parents 3fef7c4 + 98f55ae commit 536d522

File tree

105 files changed

+1248
-1228
lines changed

Some content is hidden

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

105 files changed

+1248
-1228
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 'Generate Javadocs'
2+
on:
3+
release:
4+
types: [released]
5+
6+
jobs:
7+
build-and-deploy-javadocs:
8+
name: Build and deploy Javadocs
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout 🛎️
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: 'recursive'
15+
16+
- name: set up JDK 17
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'temurin'
20+
java-version: '17'
21+
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326
24+
25+
- name: Generate Aggregate Javadocs
26+
run: |
27+
./gradlew aggregateJavadocs
28+
- name: Deploy
29+
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # pin@4.7.3
30+
with:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
BRANCH: gh-pages
33+
FOLDER: build/docs/javadoc
34+
CLEAN: true

.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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
### Fixes
2323

2424
- Send UI Profiling app start chunk when it finishes ([#4423](https://github.com/getsentry/sentry-java/pull/4423))
25+
- Republish Javadoc [#4457](https://github.com/getsentry/sentry-java/pull/4457)
26+
- Finalize `OkHttpEvent` even if no active span in `SentryOkHttpInterceptor` [#4469](https://github.com/getsentry/sentry-java/pull/4469)
27+
- Session Replay: Do not capture current replay for cached events from the past ([#4474](https://github.com/getsentry/sentry-java/pull/4474))
28+
- Session Replay: Correctly capture Dialogs and non full-sized windows ([#4354](https://github.com/getsentry/sentry-java/pull/4354))
29+
- Session Replay: Fix inconsistent `segment_id` ([#4471](https://github.com/getsentry/sentry-java/pull/4471))
2530

2631
## 8.13.2
2732

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.PHONY: all clean compile dryRelease update stop checkFormat format api assembleBenchmarkTestRelease assembleUiTestRelease assembleUiTestCriticalRelease createCoverageReports runUiTestCritical check preMerge publish
1+
.PHONY: all clean compile javadocs dryRelease update stop checkFormat format api assembleBenchmarkTestRelease assembleUiTestRelease assembleUiTestCriticalRelease createCoverageReports runUiTestCritical check preMerge publish
22

3-
all: stop clean compile createCoverageReports
3+
all: stop clean javadocs compile createCoverageReports
44
assembleBenchmarks: assembleBenchmarkTestRelease
55
assembleUiTests: assembleUiTestRelease
66
preMerge: check createCoverageReports
@@ -15,9 +15,12 @@ clean:
1515
compile:
1616
./gradlew build
1717

18+
javadocs:
19+
./gradlew aggregateJavadocs
20+
1821
# do a dry release (like a local deploy)
1922
dryRelease:
20-
./gradlew distZip --no-build-cache --no-configuration-cache
23+
./gradlew aggregateJavadocs distZip --no-build-cache --no-configuration-cache
2124

2225
# check for dependencies update
2326
update:

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 & 2 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")

0 commit comments

Comments
 (0)