test(gradle): Add isolated-projects compatibility test (EME-1072)#1160
test(gradle): Add isolated-projects compatibility test (EME-1072)#1160runningcode wants to merge 3 commits intomainfrom
Conversation
Adds an integration test that applies the plugin to a consumer project
with org.gradle.unsafe.isolated-projects=true enabled and asserts that
the build succeeds without isolation violations.
The fixture bypasses the shared root build.gradle written by
BaseSentryPluginTest because it relies on allprojects {} and
subprojects {}, both of which are incompatible with Isolated Projects.
Instead, this test wires repositories, Android config, and plugin
application per-project.
Replaces the single-module fixture with an :app + :library setup where :app depends on :library. This is where Isolated Projects compatibility actually matters — single-module builds don't exercise cross-project configuration at all. Enables autoUploadProguardMapping and telemetry to broaden coverage of plugin code paths under Isolated Projects. autoInstallation stays disabled because it accesses Project.group on sibling projects during dependency graph traversal at configuration time; tracked in EME-1072.
The old check for "problems were found reporting" never matches Gradle output — the actual phrases are "problems were found storing the configuration cache" or "problems were found reusing the configuration cache". Broadening to "problems were found " catches both, so the defensive check actually has teeth now.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3e37caa. Configure here.
| // otherwise the test would silently degrade into a plain config-cache test. | ||
| assertTrue(output) { "isolated projects" in output.lowercase() } | ||
| assertFalse( | ||
| "problems were found " in output || "cannot access '" in output, |
There was a problem hiding this comment.
Assertion misses singular "problem was found" Gradle output
Low Severity
The violation check "problems were found " only matches the plural Gradle output (2+ problems) but not the singular "1 problem was found" form that Gradle uses for exactly one violation. If a single isolated-projects violation occurs whose message doesn't contain "cannot access '", the assertFalse passes silently, defeating the purpose of this guard. Matching on "problem" (without the 's') or both forms would close this gap.
Reviewed by Cursor Bugbot for commit 3e37caa. Configure here.


Summary
Adds an integration test verifying the Sentry Android Gradle Plugin is compatible with Gradle's Isolated Projects feature when applied to a realistic consumer build. Works toward EME-1072.
Fixture shape
:app(Android application) depends on:library(Android library), both applyio.sentry.android.gradlerepositories,android, and plugin application per-project — noallprojects {}/subprojects {}, which are incompatible with Isolated Projectsorg.gradle.unsafe.isolated-projects=trueingradle.properties:app:assembleDebug --configuration-cacheAssertions
BUILD SUCCESSFULisolated projectsincubating banner — guards against the test silently degrading into a plain config-cache runPlugin features under test
autoUploadProguardMappingtelemetryautoInstallation.enabledautoInstallationis the only known Isolated Projects blocker surfaced by this test. With it enabled, the build fails at configuration cache storage with:This matches the
InvalidUserCodeExceptionsignal EME-1072 was opened to investigate and is left as a follow-up.