Skip to content

Commit 2d4595f

Browse files
runningcodeclaude
andcommitted
build(samples): Link the integration tests' Gradle files to the SDK build's
gradle.properties, gradlew, gradle/wrapper and gradle/gradle-daemon-jvm.properties are now symlinks to the SDK build's files, as in the Android sample. The copied gradle.properties had drifted from the root one (-Xmx6g and CrashOnOutOfMemoryError), and the build had no wrapper or daemon JDK pin. The SDK version now comes from the shared versionName property instead of parsing the root file. The root drops android.experimental.lint.version. It equals the lint bundled with AGP 9.4.0, so it changes nothing for the SDK build, and sentry-uitest-android's warningsAsErrors fails on it once the integration tests share the root gradle.properties. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c42a2e7 commit 2d4595f

7 files changed

Lines changed: 8 additions & 35 deletions

File tree

‎gradle.properties‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ android.useAndroidX=true
1414
# AGP 9+ migration opt-outs until we remove kotlin-android plugin and adopt built-in Kotlin.
1515
android.builtInKotlin=false
1616
android.newDsl=false
17-
android.experimental.lint.version=9.4.0
1817

1918
android.disableAgpUpgradePrompt=true
2019

‎sentry-android-integration-tests/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
This directory is a separate Gradle build that includes the SDK build, so run its tasks with
44
`./gradlew -p sentry-android-integration-tests <task>`. The SDK build doesn't include it, so
55
`./gradlew` from the repository root doesn't build, lint or format these apps.
6+
`gradle.properties`, `gradlew`, `gradle/wrapper` and `gradle/gradle-daemon-jvm.properties` are
7+
symlinks to the SDK build's, so both builds use the same Gradle, JDK and settings.
68

79
* [Espresso-based UI tests](./sentry-uitest-android) - run within SauceLabs (see /.sauce/*.yml)
810
* Also used for compatibility test matrix against new AGP versions

‎sentry-android-integration-tests/gradle.properties‎

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../gradle.properties
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../gradle/gradle-daemon-jvm.properties
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../gradle/wrapper

‎sentry-android-integration-tests/gradlew‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎sentry-android-integration-tests/settings.gradle.kts‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@ develocity {
4444
}
4545
}
4646

47-
// Gradle reads gradle.properties only for the build it belongs to, so read the SDK version from the
48-
// SDK build's file.
49-
val sentryVersion: String =
50-
providers
51-
.fileContents(layout.settingsDirectory.file("../gradle.properties"))
52-
.asText
53-
.map { java.util.Properties().apply { load(it.reader()) }.getProperty("versionName") }
54-
.get()
55-
5647
dependencyResolutionManagement {
5748
repositories {
5849
google()
@@ -62,7 +53,8 @@ dependencyResolutionManagement {
6253
versionCatalogs {
6354
create("libs") {
6455
from(files("../gradle/libs.versions.toml"))
65-
version("sentry", sentryVersion)
56+
// gradle.properties links to the SDK build's, so versionName is the SDK version.
57+
version("sentry", providers.gradleProperty("versionName").get())
6658
}
6759
}
6860
}

0 commit comments

Comments
 (0)