Skip to content

Keep parameterized test support out of Android release artifacts - #29

Open
michele-theleftbit wants to merge 1 commit into
skiptools:mainfrom
michele-theleftbit:codex/android-test-fixtures
Open

michele-theleftbit wants to merge 1 commit into
skiptools:mainfrom
michele-theleftbit:codex/android-test-fixtures

Conversation

@michele-theleftbit

Copy link
Copy Markdown

Problem

A minified Android app can fail R8 with missing TestParameterInjector types when the SkipUnit 1.8.2 main artifact is present and the test dependency is absent from the release classpath.

Change

Move the parameterized runner and argument provider to the Android test fixtures variant. Declare TestParameterInjector as testFixturesApi so generated consumer tests can subclass the provider. The main artifact no longer exposes this dependency.

Depends on skiptools/skip#770. Before merging or releasing this change, raise SkipUnit's minimum Skip version to the first release containing that companion change.

Validation

  • Built the patched Skipstone from source.
  • Ran a separate SwiftPM consumer with both patches. The two generated parameterized JUnit cases passed.
  • Ran :app:minifyReleaseWithR8 on a minimal Android consumer with SkipUnit's main artifact on its release classpath.
  • Verified TestParameterInjector was absent from releaseRuntimeClasspath and neither parameterized runner class was in the main SkipUnit release AAR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants