test(oss-licenses): introduce unified 'testapp' verification suite#380
Open
timothyfroehlich wants to merge 12 commits intorefactor-lazy-providerfrom
Open
test(oss-licenses): introduce unified 'testapp' verification suite#380timothyfroehlich wants to merge 12 commits intorefactor-lazy-providerfrom
timothyfroehlich wants to merge 12 commits intorefactor-lazy-providerfrom
Conversation
This was referenced Mar 9, 2026
7d66eeb to
5e232d6
Compare
472d6fc to
661c53b
Compare
… ArtifactView providers Replace the DependencyUtil helper and ArtifactFiles wrapper with lazy Provider-based artifact resolution directly in OssLicensesPlugin. This ensures dependency resolution happens at task execution time rather than during configuration, which is required for Configuration Cache compatibility and avoids slowing down Android Studio sync. Key changes: - Use ArtifactView.resolvedArtifacts (returns Provider) instead of eagerly iterating configuration.incoming.artifacts - Split the single @nested MapProperty<String, ArtifactFiles> into two @internal MapProperty<String, File> properties (libraryFilesByGav, pomFilesByGav) to avoid expensive redundant hashing of immutable Maven artifacts - Extract DependencyHandler into a local variable before entering lazy closures to avoid capturing the non-serializable Project object - Move ABSENT_ARTIFACT constant from deleted DependencyUtil to DependencyTask where it is used - Delete ArtifactFiles, DependencyUtil, and DependencyResolutionTest (coverage provided by existing EndToEnd integration tests)
Add assertion to testConfigurationCache that fails if Gradle logs "resolved during configuration time", catching any regression where artifact resolution leaks back into the configuration phase.
e7309bf to
37cbfb7
Compare
This was surfaced by the test app being introduced in #380
5517dd4 to
d1ed623
Compare
Rename 'integration-app' to 'testapp' and align project structure with
modern development standards.
- Refactor 'integration-app' to 'testapp' with package
'com.google.android.gms.oss.licenses.testapp'.
- Implement a Compose-based MainActivity with interactive buttons for
manual V1/V2 license activity testing.
- Divide Robolectric suite into variant-aware source sets:
- 'testDebug': Sanity checks for 'Debug License Info' placeholder.
- 'testRelease': High-signal verification of minified and obfuscated
license metadata.
- Refactor 'TestAppEndToEndTest.kt' to dynamically inject AGP/Kotlin
overrides, enabling the matrix to test older compatible versions.
- Enable parallel test execution and harmonize SDK coverage (24-36).
- Standardize all files with Apache 2.0 license headers.
- Update GitHub Actions workflow and Dependabot to target 'testapp'.
…class names Rename TestAppEndToEndTest (which builds the real testapp) to EndToEndTest, and update all class references in both files to match their new filenames: - IntegrationTest: synthetic GradleTestKit projects (config cache, relocatability, etc.) - EndToEndTest: full testapp build with real dependencies and Robolectric tests
d1ed623 to
3f48d4a
Compare
xyarco
reviewed
Mar 17, 2026
| """.trimIndent(), | ||
| """ | ||
| tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
| @Suppress("DEPRECATION") |
Collaborator
There was a problem hiding this comment.
...pp/app/src/testRelease/java/com/google/android/gms/oss/licenses/testapp/OssLicensesV1Test.kt
Outdated
Show resolved
Hide resolved
(caused issues with modifying the test app and running check)
timothyfroehlich
added a commit
that referenced
this pull request
Mar 17, 2026
This was surfaced by the test app being introduced in #380
b1c72e0 to
c0f4d58
Compare
timothyfroehlich
added a commit
to timothyfroehlich/play-services-plugins
that referenced
this pull request
Mar 18, 2026
This was surfaced by the test app being introduced in google#380
timothyfroehlich
added a commit
to timothyfroehlich/play-services-plugins
that referenced
this pull request
Mar 18, 2026
This was surfaced by the test app being introduced in google#380
timothyfroehlich
added a commit
to timothyfroehlich/play-services-plugins
that referenced
this pull request
Mar 18, 2026
This was surfaced by the test app being introduced in google#380
timothyfroehlich
added a commit
to timothyfroehlich/play-services-plugins
that referenced
this pull request
Mar 18, 2026
This was surfaced by the test app being introduced in google#380
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.
Overview
This PR introduces a robust, standalone 'testapp' verification suite for the
oss-licenses-plugin. It significantly expands the testing capabilities of the repository by providing both an interactive app for manual verification and full end to end robolectric tests of the plugin and library together.Key Changes vs Main
1. New 'testapp' Project
MainActivitywith buttons to explicitly launch the V1 (Legacy View) and V2 (Modern Compose) license activities provided by the library.releasevariant to verify the plugin's behavior in production-like scenarios.2. Robolectric Test Suite
src/testRelease: Verifies comprehensive license metadata (Gson/Guava) and detail navigation against the minified release build.src/testDebug: Validates the 'Debug License Info' placeholder injected by the plugin in development builds.3. Dynamic E2E Matrix Runner
TestAppEndToEndTest.kt: A new E2E test in the main plugin suite that uses thetestappas a template. It dynamically injects AGP and Kotlin overrides to test the plugin against its full compatibility matrix (currently AGP 8.10 through 9.1).4. Infrastructure & Hygiene
main.ymlworkflow to run on every pull request.testappdependencies.GEMINI.mdguide for maintaining the test harness.Verification
./gradlew :app:test(all 15 tests pass).