Skip to content

Commit b394bce

Browse files
authored
Merge 3120632 into ba51699
2 parents ba51699 + 3120632 commit b394bce

File tree

98 files changed

+312
-559
lines changed

Some content is hidden

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

98 files changed

+312
-559
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212
jobs:
1313
build:
1414
name: Build Job ubuntu-latest - Java 17
15-
runs-on: ubuntu-latest
15+
runs-on: macos-15
1616

1717
steps:
1818
- name: Checkout Repo

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616
jobs:
1717
analyze:
1818
name: Analyze
19-
runs-on: ubuntu-latest
19+
runs-on: macos-15
2020

2121
strategy:
2222
fail-fast: false

.github/workflows/integration-tests-benchmarks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818
jobs:
1919
test:
2020
name: Benchmarks
21-
runs-on: ubuntu-latest
21+
runs-on: macos-15
2222

2323
# we copy the secret to the env variable in order to access it in the workflow
2424
env:
@@ -67,7 +67,7 @@ jobs:
6767
config-file: .sauce/sentry-uitest-android-benchmark-lite.yml
6868

6969
app-metrics:
70-
runs-on: ubuntu-latest
70+
runs-on: macos-15
7171

7272
# we copy the secret to the env variable in order to access it in the workflow
7373
env:

.github/workflows/integration-tests-ui-critical.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
jobs:
2121
build:
2222
name: Build
23-
runs-on: ubuntu-latest
23+
runs-on: macos-15
2424
steps:
2525
- name: Checkout code
2626
uses: actions/checkout@v4
@@ -49,7 +49,7 @@ jobs:
4949
run-maestro-tests:
5050
name: Run Tests for API Level ${{ matrix.api-level }}
5151
needs: build
52-
runs-on: ubuntu-latest
52+
runs-on: macos-15
5353
strategy:
5454
# we want that the matrix keeps running, default is to cancel them if it fails.
5555
fail-fast: false

.github/workflows/integration-tests-ui.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212
jobs:
1313
test:
1414
name: Ui tests
15-
runs-on: ubuntu-latest
15+
runs-on: macos-15
1616

1717
# we copy the secret to the env variable in order to access it in the workflow
1818
env:

.github/workflows/release-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111
jobs:
1212
release:
1313
name: Build release artifacts
14-
runs-on: ubuntu-latest
14+
runs-on: macos-15
1515

1616
steps:
1717
- name: Checkout Repo

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Breaking Changes
6+
7+
- The Kotlin Language version is now set to 1.6 ([#3936](https://github.com/getsentry/sentry-java/pull/3936))
8+
59
### Fixes
610

711
- Do not log if `OtelContextScopesStorage` cannot be found ([#4127](https://github.com/getsentry/sentry-java/pull/4127))

build.gradle.kts

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import com.diffplug.spotless.LineEnding
2+
import com.vanniktech.maven.publish.JavaLibrary
3+
import com.vanniktech.maven.publish.JavadocJar
24
import com.vanniktech.maven.publish.MavenPublishBaseExtension
3-
import com.vanniktech.maven.publish.MavenPublishPlugin
4-
import com.vanniktech.maven.publish.MavenPublishPluginExtension
55
import groovy.util.Node
66
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
77
import kotlinx.kover.gradle.plugin.dsl.KoverReportExtension
@@ -17,6 +17,7 @@ plugins {
1717
id(Config.QualityPlugins.binaryCompatibilityValidator) version Config.QualityPlugins.binaryCompatibilityValidatorVersion
1818
id(Config.QualityPlugins.jacocoAndroid) version Config.QualityPlugins.jacocoAndroidVersion apply false
1919
id(Config.QualityPlugins.kover) version Config.QualityPlugins.koverVersion apply false
20+
id(Config.BuildPlugins.gradleMavenPublishPlugin) version Config.BuildPlugins.gradleMavenPublishPluginVersion apply false
2021
}
2122

2223
buildscript {
@@ -26,7 +27,6 @@ buildscript {
2627
dependencies {
2728
classpath(Config.BuildPlugins.androidGradle)
2829
classpath(kotlin(Config.BuildPlugins.kotlinGradlePlugin, version = Config.kotlinVersion))
29-
classpath(Config.BuildPlugins.gradleMavenPublishPlugin)
3030
// dokka is required by gradle-maven-publish-plugin.
3131
classpath(Config.BuildPlugins.dokkaPlugin)
3232
classpath(Config.QualityPlugins.errorpronePlugin)
@@ -95,7 +95,7 @@ allprojects {
9595
TestLogEvent.PASSED,
9696
TestLogEvent.FAILED
9797
)
98-
maxParallelForks = Runtime.getRuntime().availableProcessors() / 4
98+
maxParallelForks = 1
9999

100100
// Cap JVM args per test
101101
minHeapSize = "256m"
@@ -140,7 +140,7 @@ subprojects {
140140
androidReports("release") {
141141
xml {
142142
// Change the report file name so the Codecov Github action can find it
143-
setReportFile(file("$buildDir/reports/kover/report.xml"))
143+
setReportFile(project.layout.buildDirectory.file("reports/kover/report.xml").get().asFile)
144144
}
145145
}
146146
}
@@ -157,6 +157,7 @@ subprojects {
157157

158158
if (!this.name.contains("sample") && !this.name.contains("integration-tests") && this.name != "sentry-test-support" && this.name != "sentry-compose-helper") {
159159
apply<DistributionPlugin>()
160+
apply<com.vanniktech.maven.publish.MavenPublishPlugin>()
160161

161162
val sep = File.separator
162163

@@ -179,22 +180,30 @@ subprojects {
179180
tasks.named("distZip").configure {
180181
this.dependsOn("publishToMavenLocal")
181182
this.doLast {
182-
val distributionFilePath =
183-
"${this.project.buildDir}${sep}distributions${sep}${this.project.name}-${this.project.version}.zip"
184-
val file = File(distributionFilePath)
185-
if (!file.exists()) throw IllegalStateException("Distribution file: $distributionFilePath does not exist")
186-
if (file.length() == 0L) throw IllegalStateException("Distribution file: $distributionFilePath is empty")
183+
val file = this.project.layout.buildDirectory.file("distributions${sep}${this.project.name}-${this.project.version}.zip").get().asFile
184+
if (!file.exists()) throw IllegalStateException("Distribution file: ${file.absolutePath} does not exist")
185+
if (file.length() == 0L) throw IllegalStateException("Distribution file: ${file.absolutePath} is empty")
187186
}
188187
}
189188

190-
afterEvaluate {
191-
apply<MavenPublishPlugin>()
189+
plugins.withId("java-library") {
190+
configure<MavenPublishBaseExtension> {
191+
// we have to disable javadoc publication in maven-publish plugin as it's not
192+
// including it in the .module file https://github.com/vanniktech/gradle-maven-publish-plugin/issues/861
193+
// and do it ourselves
194+
configure(JavaLibrary(JavadocJar.None(), sourcesJar = true))
195+
}
196+
197+
configure<JavaPluginExtension> {
198+
withJavadocJar()
192199

193-
configure<MavenPublishPluginExtension> {
194-
// signing is done when uploading files to MC
195-
// via gpg:sign-and-deploy-file (release.kts)
196-
releaseSigningEnabled = false
200+
sourceCompatibility = JavaVersion.VERSION_1_8
201+
targetCompatibility = JavaVersion.VERSION_1_8
197202
}
203+
}
204+
205+
afterEvaluate {
206+
apply<MavenPublishPlugin>()
198207

199208
@Suppress("UnstableApiUsage")
200209
configure<MavenPublishBaseExtension> {
@@ -206,7 +215,7 @@ subprojects {
206215
repositories {
207216
maven {
208217
name = "unityMaven"
209-
url = file("${rootProject.buildDir}/unityMaven").toURI()
218+
url = rootProject.layout.buildDirectory.file("unityMaven").get().asFile.toURI()
210219
}
211220
}
212221
}
@@ -243,7 +252,7 @@ spotless {
243252

244253
gradle.projectsEvaluated {
245254
tasks.create("aggregateJavadocs", Javadoc::class.java) {
246-
setDestinationDir(file("$buildDir/docs/javadoc"))
255+
setDestinationDir(project.layout.buildDirectory.file("docs/javadoc").get().asFile)
247256
title = "${project.name} $version API"
248257
val opts = options as StandardJavadocDocletOptions
249258
opts.quiet()

buildSrc/src/main/java/Config.kt

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
import java.math.BigDecimal
33

44
object Config {
5-
val AGP = System.getenv("VERSION_AGP") ?: "7.4.2"
6-
val kotlinVersion = "1.8.0"
5+
val AGP = System.getenv("VERSION_AGP") ?: "8.6.0"
6+
val kotlinVersion = "1.9.24"
77
val kotlinStdLib = "stdlib-jdk8"
88

99
val springBootVersion = "2.7.5"
1010
val springBoot3Version = "3.4.2"
11-
val kotlinCompatibleLanguageVersion = "1.4"
11+
val kotlinCompatibleLanguageVersion = "1.6"
1212

13-
val composeVersion = "1.5.3"
14-
val androidComposeCompilerVersion = "1.4.0"
13+
// see https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-compatibility-and-versioning.html#kotlin-compatibility
14+
// see https://developer.android.com/jetpack/androidx/releases/compose-kotlin
15+
val composeVersion = "1.6.11"
16+
val androidComposeCompilerVersion = "1.5.14"
1517

1618
object BuildPlugins {
1719
val androidGradle = "com.android.tools.build:gradle:$AGP"
@@ -23,8 +25,9 @@ object Config {
2325
val springDependencyManagementVersion = "1.0.11.RELEASE"
2426
val gretty = "org.gretty"
2527
val grettyVersion = "4.0.0"
26-
val gradleMavenPublishPlugin = "com.vanniktech:gradle-maven-publish-plugin:0.18.0"
27-
val dokkaPlugin = "org.jetbrains.dokka:dokka-gradle-plugin:1.7.10"
28+
val gradleMavenPublishPlugin = "com.vanniktech.maven.publish"
29+
val gradleMavenPublishPluginVersion = "0.30.0"
30+
val dokkaPlugin = "org.jetbrains.dokka:dokka-gradle-plugin:1.9.20"
2831
val dokkaPluginAlias = "org.jetbrains.dokka"
2932
val composeGradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$composeVersion"
3033
val commonsCompressOverride = "org.apache.commons:commons-compress:1.25.0"
@@ -39,7 +42,7 @@ object Config {
3942

4043
val abiFilters = listOf("x86", "armeabi-v7a", "x86_64", "arm64-v8a")
4144

42-
fun shouldSkipDebugVariant(name: String): Boolean {
45+
fun shouldSkipDebugVariant(name: String?): Boolean {
4346
return System.getenv("CI")?.toBoolean() ?: false && name == "debug"
4447
}
4548
}
@@ -58,6 +61,7 @@ object Config {
5861
val androidxCore = "androidx.core:core:1.3.2"
5962
val androidxSqlite = "androidx.sqlite:sqlite:2.3.1"
6063
val androidxRecylerView = "androidx.recyclerview:recyclerview:1.2.1"
64+
val androidxAnnotation = "androidx.annotation:annotation:1.9.1"
6165

6266
val slf4jApi = "org.slf4j:slf4j-api:1.7.30"
6367
val slf4jApi2 = "org.slf4j:slf4j-api:2.0.5"
@@ -142,14 +146,14 @@ object Config {
142146

143147
// compose deps
144148
val composeNavigation = "androidx.navigation:navigation-compose:$navigationVersion"
145-
val composeActivity = "androidx.activity:activity-compose:1.4.0"
146-
val composeFoundation = "androidx.compose.foundation:foundation:$composeVersion"
147-
val composeUi = "androidx.compose.ui:ui:$composeVersion"
149+
val composeActivity = "androidx.activity:activity-compose:1.8.2"
150+
val composeFoundation = "androidx.compose.foundation:foundation:1.6.3"
151+
val composeUi = "androidx.compose.ui:ui:1.6.3"
152+
val composeFoundationLayout = "androidx.compose.foundation:foundation-layout:1.6.3"
153+
val composeMaterial = "androidx.compose.material3:material3:1.2.1"
148154

149155
val composeUiReplay = "androidx.compose.ui:ui:1.5.0" // Note: don't change without testing forwards compatibility
150-
val composeFoundationLayout = "androidx.compose.foundation:foundation-layout:$composeVersion"
151-
val composeMaterial = "androidx.compose.material3:material3:1.0.0-alpha13"
152-
val composeCoil = "io.coil-kt:coil-compose:2.0.0"
156+
val composeCoil = "io.coil-kt:coil-compose:2.6.0"
153157

154158
val apolloKotlin = "com.apollographql.apollo3:apollo-runtime:3.8.2"
155159

@@ -193,7 +197,7 @@ object Config {
193197
val androidxTestOrchestrator = "androidx.test:orchestrator:1.5.0"
194198
val androidxJunit = "androidx.test.ext:junit:1.1.5"
195199
val androidxCoreKtx = "androidx.core:core-ktx:1.7.0"
196-
val robolectric = "org.robolectric:robolectric:4.10.3"
200+
val robolectric = "org.robolectric:robolectric:4.14"
197201
val mockitoKotlin = "org.mockito.kotlin:mockito-kotlin:4.1.0"
198202
val mockitoInline = "org.mockito:mockito-inline:4.8.0"
199203
val awaitility = "org.awaitility:awaitility-kotlin:4.1.1"
@@ -220,7 +224,7 @@ object Config {
220224
val gradleVersionsPlugin = "com.github.ben-manes:gradle-versions-plugin:0.42.0"
221225
val gradleVersions = "com.github.ben-manes.versions"
222226
val detekt = "io.gitlab.arturbosch.detekt"
223-
val detektVersion = "1.19.0"
227+
val detektVersion = "1.23.5"
224228
val detektPlugin = "io.gitlab.arturbosch.detekt"
225229
val binaryCompatibilityValidatorVersion = "0.13.0"
226230
val binaryCompatibilityValidatorPlugin = "org.jetbrains.kotlinx:binary-compatibility-validator:$binaryCompatibilityValidatorVersion"

buildSrc/src/main/java/Publication.kt

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ fun DistributionContainer.configureForMultiplatform(project: Project) {
2424
}
2525
from("build${sep}libs") {
2626
include("*android*")
27-
withJavadoc(renameTo = "compose-android")
27+
include("*androidRelease-javadoc*")
28+
rename {
29+
it.replace("androidRelease-javadoc", "android")
30+
}
2831
}
2932
}
3033
this.getByName("main").contents {
@@ -38,8 +41,8 @@ fun DistributionContainer.configureForMultiplatform(project: Project) {
3841
rename {
3942
it.replace("-kotlin", "")
4043
.replace("-metadata", "")
44+
.replace("Multiplatform-javadoc", "")
4145
}
42-
withJavadoc()
4346
}
4447
}
4548
this.maybeCreate("desktop").contents {
@@ -49,7 +52,10 @@ fun DistributionContainer.configureForMultiplatform(project: Project) {
4952
}
5053
from("build${sep}libs") {
5154
include("*desktop*")
52-
withJavadoc(renameTo = "compose-desktop")
55+
include("*desktop-javadoc*")
56+
rename {
57+
it.replace("desktop-javadoc", "desktop")
58+
}
5359
}
5460
}
5561

@@ -77,16 +83,13 @@ fun DistributionContainer.configureForJvm(project: Project) {
7783
from("build${sep}publications${sep}release") {
7884
renameModule(project.name, version = version)
7985
}
80-
}
81-
}
82-
83-
private fun CopySpec.withJavadoc(renameTo: String = "compose") {
84-
include("*javadoc*")
85-
rename {
86-
if (it.contains("javadoc")) {
87-
it.replace("compose", renameTo)
88-
} else {
89-
it
86+
from("build${sep}intermediates${sep}java_doc_jar${sep}release") {
87+
include("*javadoc*")
88+
rename { it.replace("release", "${project.name}-$version") }
89+
}
90+
from("build${sep}intermediates${sep}source_jar${sep}release") {
91+
include("*sources*")
92+
rename { it.replace("release", "${project.name}-$version") }
9093
}
9194
}
9295
}

0 commit comments

Comments
 (0)