test(oss-licenses): implement comprehensive E2E testing with standalone testapp#412
Merged
timothyfroehlich merged 1 commit intomainfrom Apr 22, 2026
Merged
test(oss-licenses): implement comprehensive E2E testing with standalone testapp#412timothyfroehlich merged 1 commit intomainfrom
timothyfroehlich merged 1 commit intomainfrom
Conversation
…ne testapp ## Summary Part 3 of the stacked testing infrastructure update for `oss-licenses-plugin`. ## Key changes - Added a dedicated `src/e2eTest/kotlin/` source set with its own `e2eTestTask` Test task, wired into `check`. - `EndToEndTest.kt` uses GradleTestKit to build the standalone `testapp` against the AGP/Gradle matrix, patching the testapp's `libs.versions.toml` and (for AGP 8.x) the Kotlin block in `app/build.gradle.kts`. - Split the AGP/Gradle version matrix in `build.gradle.kts` into `e2eVersions` (heavier, modern AGPs only) and `integrationOnlyVersions` (older AGPs for backward-compat coverage). - Shared the TestKit task setup (publish dep, repo inputs, `plugin_version` / `testkit_path` / `java21_home` / `repo_path` system properties) between `integrationTestTask` and `e2eTestTask` via a `Test.configureTestKitDefaults()` helper. - Added `oss-licenses-e2e` matrix job to `.github/workflows/oss-licenses.yml`, downloading the local repo artifact from `oss-licenses-build` and running `./gradlew e2eTestTask --tests "…EndToEndTest_AGP_X"`. - Pre-created `$ANDROID_USER_HOME` before `setup-gradle` runs to keep its cache path stable across CI runs (explained in a new comment). - Added keep-in-sync comments between the e2e matrix in the workflow and the `e2eVersions` map. - Minor cleanup: enabled `isShrinkResources` on testapp release; dropped the unused `org.junit.Ignore` import from `OssLicensesV2Test`; removed a stale "CC strictness flags" comment. ## Test plan - [x] `./gradlew :oss-licenses-plugin:check` passes locally across the full integration matrix (AGP 7.4 / 8.7 / 8.12 / 9.x stable / 9.x alpha) and the full e2e matrix (AGP 8.12 / 9.x stable / 9.x alpha). Ran on macOS with `ANDROID_HOME` set. - [ ] CI workflow_call runs green across `oss-licenses-build`, `oss-licenses-integration-test` matrix, and `oss-licenses-e2e` matrix.
xyarco
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 3 of the stacked testing infrastructure update for
oss-licenses-plugin.Key changes
src/e2eTest/kotlin/source set with its owne2eTestTaskTest task, wired intocheck.EndToEndTest.ktuses GradleTestKit to build the standalonetestappagainst the AGP/Gradle matrix, patching the testapp'slibs.versions.tomland (for AGP 8.x) the Kotlin block inapp/build.gradle.kts.build.gradle.ktsintoe2eVersions(heavier, modern AGPs only) andintegrationOnlyVersions(older AGPs for backward-compat coverage).plugin_version/testkit_path/java21_home/repo_pathsystem properties) betweenintegrationTestTaskande2eTestTaskvia aTest.configureTestKitDefaults()helper.oss-licenses-e2ematrix job to.github/workflows/oss-licenses.yml, downloading the local repo artifact fromoss-licenses-buildand running./gradlew e2eTestTask --tests "…EndToEndTest_AGP_X".$ANDROID_USER_HOMEbeforesetup-gradleruns to keep its cache path stable across CI runs (explained in a new comment).e2eVersionsmap.isShrinkResourceson testapp release; dropped the unusedorg.junit.Ignoreimport fromOssLicensesV2Test; removed a stale "CC strictness flags" comment.Test plan
./gradlew :oss-licenses-plugin:checkpasses locally across the full integration matrix (AGP 7.4 / 8.7 / 8.12 / 9.x stable / 9.x alpha) and the full e2e matrix (AGP 8.12 / 9.x stable / 9.x alpha). Ran on macOS withANDROID_HOMEset.oss-licenses-build,oss-licenses-integration-testmatrix, andoss-licenses-e2ematrix.