Skip to content

Commit

Permalink
Merge 1a98fde into 99506f3
Browse files Browse the repository at this point in the history
  • Loading branch information
adinauer authored Oct 13, 2022
2 parents 99506f3 + 1a98fde commit b0b8572
Show file tree
Hide file tree
Showing 301 changed files with 8,633 additions and 722 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# TODO: windows-latest
os: [ubuntu-latest, macos-latest]
# Zulu Community distribution of OpenJDK
java: ['11']
java: ['17']

steps:
- name: Git checkout
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
distribution: 'temurin'

- name: Cache Gradle packages
uses: actions/cache@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/format-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
distribution: 'temurin'
java-version: '17'

- name: Cache Gradle packages
uses: actions/cache@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/generate-javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
distribution: 'temurin'
java-version: '17'

- name: Cache Gradle packages
uses: actions/cache@v2
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/integration-tests-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
- name: Git checkout
uses: actions/checkout@v2

- name: 'Set up Java: 11'
- name: 'Set up Java: 17'
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'

# Clean, build and release a test apk
- name: Make assembleBenchmarks
Expand Down Expand Up @@ -57,11 +57,11 @@ jobs:
- name: Git checkout
uses: actions/checkout@v2

- name: 'Set up Java: 11'
- name: 'Set up Java: 17'
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'

- uses: actions/cache@v3
id: app-plain-cache
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration-tests-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- name: Git checkout
uses: actions/checkout@v2

- name: 'Set up Java: 11'
- name: 'Set up Java: 17'
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'

# Clean, build and release a test apk
- name: Make assembleUiTests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ bin/
distributions/
/Sentry/A1F16C4F5D23B2A1D281EE471D6F836BDEA23CB4/
*.vscode/
sentry-spring-boot-starter-jakarta/src/main/resources/META-INF/spring.factories
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixes

- Remove verbose FrameMetricsAggregator failure logging ([#2293](https://github.com/getsentry/sentry-java/pull/2293))
- Support Spring 6 and Spring Boot 3 ([#2289](https://github.com/getsentry/sentry-java/pull/2289))

## 6.5.0

Expand Down
13 changes: 9 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,17 @@ apiValidation {
"sentry-samples-openfeign",
"sentry-samples-servlet",
"sentry-samples-spring",
"sentry-samples-spring-jakarta",
"sentry-spring-jakarta",
"sentry-spring-boot-starter-jakarta",
"sentry-samples-spring-boot",
"sentry-samples-spring-boot-jakarta",
"sentry-samples-spring-boot-webflux",
"sentry-samples-netflix-dgs",
"sentry-uitest-android",
"sentry-uitest-android-benchmark",
"test-app-plain",
"test-app-sentry",
"test-app-sentry"
)
)
}
Expand Down Expand Up @@ -155,16 +159,17 @@ spotless {
target("**/*.java")
removeUnusedImports()
googleJavaFormat()
targetExclude("**/generated/**", "**/vendor/**")
targetExclude("**/generated/**", "**/vendor/**", "sentry-spring-jakarta/**", "sentry-spring-boot-starter-jakarta/**")
}

kotlin {
target("**/*.kt")
ktlint()
ktlint("0.47.1")
targetExclude("sentry-spring-jakarta/**", "sentry-spring-boot-starter-jakarta/**")
}
kotlinGradle {
target("**/*.kts")
ktlint()
ktlint("0.47.1")
}
}

Expand Down
20 changes: 16 additions & 4 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ object Config {
val kotlinStdLib = "stdlib-jdk8"

val springBootVersion = "2.7.4"
val springBoot3Version = "3.0.0-M5"
val kotlinCompatibleLanguageVersion = "1.4"

val composeVersion = "1.1.1"
Expand Down Expand Up @@ -74,6 +75,14 @@ object Config {
val springBootStarterSecurity = "org.springframework.boot:spring-boot-starter-security:$springBootVersion"
val springBootStarterJdbc = "org.springframework.boot:spring-boot-starter-jdbc:$springBootVersion"

val springBoot3Starter = "org.springframework.boot:spring-boot-starter:$springBoot3Version"
val springBoot3StarterTest = "org.springframework.boot:spring-boot-starter-test:$springBoot3Version"
val springBoot3StarterWeb = "org.springframework.boot:spring-boot-starter-web:$springBoot3Version"
val springBoot3StarterWebflux = "org.springframework.boot:spring-boot-starter-webflux:$springBoot3Version"
val springBoot3StarterAop = "org.springframework.boot:spring-boot-starter-aop:$springBoot3Version"
val springBoot3StarterSecurity = "org.springframework.boot:spring-boot-starter-security:$springBoot3Version"
val springBoot3StarterJdbc = "org.springframework.boot:spring-boot-starter-jdbc:$springBoot3Version"

val springWeb = "org.springframework:spring-webmvc"
val springWebflux = "org.springframework:spring-webflux"
val springSecurityWeb = "org.springframework.security:spring-security-web"
Expand Down Expand Up @@ -113,6 +122,7 @@ object Config {

private val navigationVersion = "2.4.2"
val navigationRuntime = "androidx.navigation:navigation-runtime:$navigationVersion"

// compose deps
val composeNavigation = "androidx.navigation:navigation-compose:$navigationVersion"
val composeActivity = "androidx.activity:activity-compose:1.4.0"
Expand All @@ -130,6 +140,7 @@ object Config {

object TestLibs {
private val androidxTestVersion = "1.4.0"

// todo This beta version is needed to run ui tests on Android 13.
// It will be replaced by androidxTestVersion when 1.5.0 will be out.
private val androidxTestVersionBeta = "1.5.0-beta01"
Expand All @@ -147,8 +158,8 @@ object Config {
val androidxJunit = "androidx.test.ext:junit:1.1.3"
val androidxCoreKtx = "androidx.core:core-ktx:1.7.0"
val robolectric = "org.robolectric:robolectric:4.7.3"
val mockitoKotlin = "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
val mockitoInline = "org.mockito:mockito-inline:4.3.1"
val mockitoKotlin = "org.mockito.kotlin:mockito-kotlin:4.0.0"
val mockitoInline = "org.mockito:mockito-inline:4.8.0"
val awaitility = "org.awaitility:awaitility-kotlin:4.1.1"
val mockWebserver = "com.squareup.okhttp3:mockwebserver:${Libs.okHttpVersion}"
val mockWebserver4 = "com.squareup.okhttp3:mockwebserver:4.9.3"
Expand All @@ -163,9 +174,9 @@ object Config {
val minimumCoverage = BigDecimal.valueOf(0.6)
}
val spotless = "com.diffplug.spotless"
val spotlessVersion = "6.2.1"
val spotlessVersion = "6.11.0"
val errorProne = "net.ltgt.errorprone"
val errorpronePlugin = "net.ltgt.gradle:gradle-errorprone-plugin:2.0.1"
val errorpronePlugin = "net.ltgt.gradle:gradle-errorprone-plugin:3.0.1"
val gradleVersionsPlugin = "com.github.ben-manes:gradle-versions-plugin:0.42.0"
val gradleVersions = "com.github.ben-manes.versions"
val detekt = "io.gitlab.arturbosch.detekt"
Expand All @@ -185,6 +196,7 @@ object Config {
val SENTRY_LOG4J2_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.log4j2"
val SENTRY_SPRING_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring"
val SENTRY_SPRING_BOOT_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring-boot"
val SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring-boot.jakarta"
val group = "io.sentry"
val description = "SDK for sentry.io"
val versionNameProp = "versionName"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Daemon’s heap size
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m -XX:MaxMetaspaceSize=1536m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1536m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC

org.gradle.parallel=true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import android.app.ActivityManager
import android.app.ActivityManager.ProcessErrorStateInfo.NOT_RESPONDING
import android.app.ActivityManager.ProcessErrorStateInfo.NO_ERROR
import android.content.Context
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.eq
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import org.mockito.kotlin.any
import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
import org.mockito.kotlin.whenever
import java.util.concurrent.CountDownLatch
import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import android.app.Activity
import android.util.SparseIntArray
import androidx.core.app.FrameMetricsAggregator
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import com.nhaarman.mockitokotlin2.whenever
import io.sentry.ILogger
import io.sentry.protocol.SentryId
import org.junit.runner.RunWith
import org.mockito.kotlin.any
import org.mockito.kotlin.mock
import org.mockito.kotlin.times
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ import android.app.ActivityManager
import android.app.ActivityManager.RunningAppProcessInfo
import android.app.Application
import android.os.Bundle
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.anyOrNull
import com.nhaarman.mockitokotlin2.check
import com.nhaarman.mockitokotlin2.eq
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.never
import com.nhaarman.mockitokotlin2.verify
import com.nhaarman.mockitokotlin2.whenever
import io.sentry.Breadcrumb
import io.sentry.Hub
import io.sentry.Scope
Expand All @@ -25,6 +17,14 @@ import io.sentry.TransactionContext
import io.sentry.TransactionFinishedCallback
import io.sentry.TransactionOptions
import io.sentry.protocol.TransactionNameSource
import org.mockito.kotlin.any
import org.mockito.kotlin.anyOrNull
import org.mockito.kotlin.check
import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
import org.mockito.kotlin.never
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever
import java.util.Date
import kotlin.test.BeforeTest
import kotlin.test.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import android.content.Context
import android.os.Bundle
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import io.sentry.ILogger
import io.sentry.MainEventProcessor
import io.sentry.SendCachedEnvelopeFireAndForgetIntegration
import io.sentry.SentryOptions
import io.sentry.android.fragment.FragmentLifecycleIntegration
import io.sentry.android.timber.SentryTimberIntegration
import org.junit.runner.RunWith
import org.mockito.kotlin.any
import org.mockito.kotlin.mock
import org.mockito.kotlin.whenever
import java.io.File
import kotlin.test.BeforeTest
import kotlin.test.Test
Expand Down Expand Up @@ -53,7 +53,8 @@ class AndroidOptionsInitializerTest {
mockContext.configureContext()
sentryOptions.configureOptions()
AndroidOptionsInitializer.init(
sentryOptions, if (useRealContext) context else mockContext
sentryOptions,
if (useRealContext) context else mockContext
)
}

Expand All @@ -71,8 +72,13 @@ class AndroidOptionsInitializerTest {
)
sentryOptions.setDebug(true)
AndroidOptionsInitializer.init(
sentryOptions, mockContext, logger, createBuildInfo(minApi),
createClassMock(classToLoad), isFragmentAvailable, isTimberAvailable
sentryOptions,
mockContext,
logger,
createBuildInfo(minApi),
createClassMock(classToLoad),
isFragmentAvailable,
isTimberAvailable
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ import android.content.Context
import android.os.Build
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.argumentCaptor
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.never
import com.nhaarman.mockitokotlin2.spy
import com.nhaarman.mockitokotlin2.times
import com.nhaarman.mockitokotlin2.verify
import com.nhaarman.mockitokotlin2.whenever
import io.sentry.IHub
import io.sentry.ILogger
import io.sentry.ISentryExecutorService
Expand All @@ -21,6 +13,14 @@ import io.sentry.SentryTracer
import io.sentry.TransactionContext
import io.sentry.test.getCtor
import org.junit.runner.RunWith
import org.mockito.kotlin.any
import org.mockito.kotlin.argumentCaptor
import org.mockito.kotlin.mock
import org.mockito.kotlin.never
import org.mockito.kotlin.spy
import org.mockito.kotlin.times
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever
import java.io.File
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.sentry.android.core

import com.nhaarman.mockitokotlin2.mock
import io.sentry.android.core.internal.util.ConnectivityChecker
import org.mockito.kotlin.mock
import kotlin.test.Test
import kotlin.test.assertFalse
import kotlin.test.assertNotNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.sentry.android.core

import android.content.Context
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.check
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.verify
import io.sentry.IHub
import io.sentry.exception.ExceptionMechanismException
import org.mockito.kotlin.any
import org.mockito.kotlin.check
import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertNotNull
Expand Down
Loading

0 comments on commit b0b8572

Please sign in to comment.