Skip to content
Merged
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
12 changes: 0 additions & 12 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,6 @@ object Config {
val springBootConfiguration = "org.springframework.boot:spring-boot-configuration-processor"
}

object TestLibs {
val androidJUnitRunner = "androidx.test.runner.AndroidJUnitRunner"
val awaitility = "org.awaitility:awaitility-kotlin:4.1.1"
val awaitility3 = "org.awaitility:awaitility-kotlin:3.1.6" // need this due to a conflict of awaitility4+ and espresso on hamcrest
val hsqldb = "org.hsqldb:hsqldb:2.6.1"
val javaFaker = "com.github.javafaker:javafaker:1.0.2"
val msgpack = "org.msgpack:msgpack-core:0.9.8"
val leakCanaryInstrumentation = "com.squareup.leakcanary:leakcanary-android-instrumentation:2.14"
val composeUiTestJunit4 = "androidx.compose.ui:ui-test-junit4:1.6.8"
val okio = "com.squareup.okio:okio:1.13.0"
}

object QualityPlugins {
object Jacoco {
// TODO [POTEL] add tests and restore
Expand Down
10 changes: 9 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ androidx-compose-material3 = { module = "androidx.compose.material3:material3",
androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidxComposeVersion" }
# Note: don't change without testing forwards compatibility
androidx-compose-ui-replay = { module = "androidx.compose.ui:ui", version = "1.5.0" }
androidx-core = { module = "androidx.core:core", version = "1.3.2"}
androidx-core = { module = "androidx.core:core", version = "1.3.2" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.7.0" }
androidx-navigation-runtime = { module = "androidx.navigation:navigation-runtime", version.ref = "androidxNavigation" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidxNavigation" }
coil-compose = { module = "io.coil-kt:coil-compose", version = "2.6.0" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }

# test libraries
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version = "1.6.8" }
androidx-test-core = { module = "androidx.test:core", version.ref = "androidxTestCore" }
androidx-test-core-ktx = { module = "androidx.test:core-ktx", version.ref = "androidxTestCore" }
androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" }
Expand All @@ -59,8 +60,15 @@ androidx-test-ext-junit = { module = "androidx.test.ext:junit", version = "1.1.5
androidx-test-orchestrator = { module = "androidx.test:orchestrator", version = "1.5.0" }
androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidxTestCore" }
androidx-test-runner = { module = "androidx.test:runner", version = "1.6.2" }
awaitility-kotlin = { module = "org.awaitility:awaitility-kotlin", version = "4.1.1" }
awaitility3-kotlin = { module = "org.awaitility:awaitility-kotlin", version = "3.1.6" }
hsqldb = { module = "org.hsqldb:hsqldb", version = "2.6.1" }
javafaker = { module = "com.github.javafaker:javafaker", version = "1.0.2" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version = "1.6.1" }
leakcanary-instrumentation = { module = "com.squareup.leakcanary:leakcanary-android-instrumentation", version = "2.14" }
mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version = "4.1.0" }
mockito-inline = { module = "org.mockito:mockito-inline", version = "4.8.0" }
msgpack = { module = "org.msgpack:msgpack-core", version = "0.9.8" }
okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
okio = { module = "com.squareup.okio:okio", version = "1.13.0" }
roboelectric = { module = "org.robolectric:robolectric", version = "4.14" }
4 changes: 2 additions & 2 deletions sentry-android-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = Config.TestLibs.androidJUnitRunner
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

buildConfigField("String", "SENTRY_ANDROID_SDK_NAME", "\"${Config.Sentry.SENTRY_ANDROID_SDK_NAME}\"")

Expand Down Expand Up @@ -101,9 +101,9 @@ dependencies {
testImplementation(libs.androidx.test.core)
testImplementation(libs.androidx.test.ext.junit)
testImplementation(libs.androidx.test.runner)
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
testImplementation(Config.TestLibs.awaitility)
testImplementation(projects.sentryTestSupport)
testImplementation(projects.sentryAndroidFragment)
testImplementation(projects.sentryAndroidTimber)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ android {
versionCode = 1
versionName = "1.0.0"

testInstrumentationRunner = Config.TestLibs.androidJUnitRunner
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// Runs each test in its own instance of Instrumentation. This way they are isolated from
// one another and get their own Application instance.
// https://developer.android.com/training/testing/instrumented-tests/androidx-test-libraries/runner#enable-gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
versionCode = 1
versionName = "1.0.0"

testInstrumentationRunner = Config.TestLibs.androidJUnitRunner
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// Runs each test in its own instance of Instrumentation. This way they are isolated from
// one another and get their own Application instance.
// https://developer.android.com/training/testing/instrumented-tests/androidx-test-libraries/runner#enable-gradle
Expand Down Expand Up @@ -117,15 +117,15 @@ dependencies {

androidTestUtil(libs.androidx.test.orchestrator)
androidTestImplementation(projects.sentryTestSupport)
androidTestImplementation(libs.kotlin.test.junit)
androidTestImplementation(libs.androidx.test.core.ktx)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.awaitility3.kotlin)
androidTestImplementation(libs.kotlin.test.junit)
androidTestImplementation(libs.leakcanary.instrumentation)
androidTestImplementation(libs.okhttp.mockwebserver)
androidTestImplementation(Config.TestLibs.leakCanaryInstrumentation)
androidTestImplementation(Config.TestLibs.awaitility3)
}

tasks.withType<JavaCompile>().configureEach {
Expand Down
2 changes: 1 addition & 1 deletion sentry-android-ndk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = Config.TestLibs.androidJUnitRunner
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

ndk {
abiFilters.addAll(Config.Android.abiFilters)
Expand Down
4 changes: 2 additions & 2 deletions sentry-android-replay/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = Config.TestLibs.androidJUnitRunner
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

// for AGP 4.1
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
Expand Down Expand Up @@ -91,9 +91,9 @@ dependencies {
testImplementation(libs.androidx.activity.compose)
testImplementation(libs.androidx.test.ext.junit)
testImplementation(libs.androidx.test.runner)
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
testImplementation(Config.TestLibs.awaitility)
testImplementation(libs.androidx.compose.ui)
testImplementation(libs.androidx.compose.foundation)
testImplementation(libs.androidx.compose.foundation.layout)
Expand Down
2 changes: 1 addition & 1 deletion sentry-android-timber/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = Config.TestLibs.androidJUnitRunner
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

// for AGP 4.1
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
Expand Down
12 changes: 6 additions & 6 deletions sentry-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ kotlin {
}
val androidUnitTest by getting {
dependencies {
implementation(libs.kotlin.test.junit)
implementation(libs.mockito.kotlin)
implementation(libs.mockito.inline)
implementation(libs.androidx.compose.ui.test.junit4)
implementation(libs.androidx.navigation.compose)
implementation(libs.roboelectric)
implementation(libs.androidx.test.ext.junit)
implementation(libs.androidx.test.rules)
implementation(libs.androidx.test.runner)
implementation(libs.androidx.test.ext.junit)
implementation(Config.TestLibs.composeUiTestJunit4)
implementation(libs.kotlin.test.junit)
implementation(libs.mockito.inline)
implementation(libs.mockito.kotlin)
implementation(libs.roboelectric)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions sentry-jdbc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ dependencies {
// tests
testImplementation(projects.sentryTestSupport)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.hsqldb)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
testImplementation(Config.TestLibs.awaitility)
testImplementation(Config.TestLibs.hsqldb)
}

configure<SourceSetContainer> {
Expand Down
2 changes: 1 addition & 1 deletion sentry-openfeign/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ dependencies {
// tests
testImplementation(projects.sentryTestSupport)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(Config.TestLibs.awaitility)
testImplementation(libs.okhttp.mockwebserver)
testImplementation(Config.Libs.feignCore)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ dependencies {
// tests
testImplementation(projects.sentryTestSupport)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(Config.TestLibs.awaitility)
}

configure<SourceSetContainer> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ dependencies {
// tests
testImplementation(projects.sentryTestSupport)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(Config.TestLibs.awaitility)

testImplementation(Config.Libs.OpenTelemetry.otelSdk)
testImplementation(Config.Libs.OpenTelemetry.otelSemconv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ dependencies {
testImplementation(projects.sentryOpentelemetry.sentryOpentelemetryBootstrap)
testImplementation(projects.sentryTestSupport)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(Config.TestLibs.awaitility)

testImplementation(Config.Libs.OpenTelemetry.otelSdk)
testImplementation(Config.Libs.OpenTelemetry.otelSemconv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ dependencies {

// database query tracing
implementation(projects.sentryJdbc)
runtimeOnly(Config.TestLibs.hsqldb)
runtimeOnly(libs.hsqldb)

testImplementation(projects.sentrySystemTestSupport)
testImplementation(Config.Libs.springBoot3StarterTest) {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies {

// database query tracing
implementation(projects.sentryJdbc)
runtimeOnly(Config.TestLibs.hsqldb)
runtimeOnly(libs.hsqldb)

testImplementation(projects.sentrySystemTestSupport)
testImplementation(Config.Libs.springBoot3StarterTest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies {

// database query tracing
implementation(projects.sentryJdbc)
runtimeOnly(Config.TestLibs.hsqldb)
runtimeOnly(libs.hsqldb)

testImplementation(projects.sentrySystemTestSupport)
testImplementation(Config.Libs.springBoot3StarterTest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies {

// database query tracing
implementation(projects.sentryJdbc)
runtimeOnly(Config.TestLibs.hsqldb)
runtimeOnly(libs.hsqldb)

testImplementation(projects.sentrySystemTestSupport)
testImplementation(Config.Libs.springBootStarterTest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {

// database query tracing
implementation(projects.sentryJdbc)
runtimeOnly(Config.TestLibs.hsqldb)
runtimeOnly(libs.hsqldb)

testImplementation(projects.sentrySystemTestSupport)
testImplementation(Config.Libs.springBootStarterTest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ dependencies {

// database query tracing
implementation(projects.sentryJdbc)
runtimeOnly(Config.TestLibs.hsqldb)
runtimeOnly(libs.hsqldb)

testImplementation(projects.sentrySystemTestSupport)
testImplementation(Config.Libs.springBootStarterTest) {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
Expand Down
2 changes: 1 addition & 1 deletion sentry-servlet-jakarta/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ dependencies {
testImplementation(Config.Libs.servletApiJakarta)
testImplementation(projects.sentryTestSupport)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(Config.TestLibs.awaitility)
}

configure<SourceSetContainer> {
Expand Down
2 changes: 1 addition & 1 deletion sentry-servlet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ dependencies {
// tests
testImplementation(projects.sentryTestSupport)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(Config.TestLibs.awaitility)
testImplementation(Config.Libs.springBootStarterTest)
testImplementation(Config.Libs.springBootStarterWeb)
}
Expand Down
2 changes: 1 addition & 1 deletion sentry-spring-jakarta/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ dependencies {
testImplementation(projects.sentryTestSupport)
testImplementation(projects.sentryGraphql)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
Expand All @@ -68,7 +69,6 @@ dependencies {
testImplementation(Config.Libs.springBoot3StarterAop)
testImplementation(Config.Libs.springBoot3StarterGraphql)
testImplementation(Config.Libs.contextPropagation)
testImplementation(Config.TestLibs.awaitility)
testImplementation(Config.Libs.graphQlJava22)
testImplementation(projects.sentryReactor)
}
Expand Down
2 changes: 1 addition & 1 deletion sentry-spring/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies {
testImplementation(projects.sentryTestSupport)
testImplementation(projects.sentryGraphql)
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
Expand All @@ -56,7 +57,6 @@ dependencies {
testImplementation(Config.Libs.springBootStarterSecurity)
testImplementation(Config.Libs.springBootStarterAop)
testImplementation(Config.Libs.springBootStarterGraphql)
testImplementation(Config.TestLibs.awaitility)
testImplementation(Config.Libs.graphQlJava)
}

Expand Down
8 changes: 4 additions & 4 deletions sentry/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ dependencies {
errorprone(Config.CompileOnly.errorProneNullAway)
// tests
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(libs.awaitility.kotlin)
testImplementation(libs.javafaker)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
testImplementation(Config.TestLibs.awaitility)
testImplementation(Config.TestLibs.javaFaker)
testImplementation(Config.TestLibs.msgpack)
testImplementation(Config.TestLibs.okio)
testImplementation(libs.msgpack)
testImplementation(libs.okio)
testImplementation(projects.sentryTestSupport)
}

Expand Down
Loading