Add Hilt testing manifest activity artifact#5220
Conversation
Adds a small published Android AAR containing a Hilt-enabled ComponentActivity and manifest entry for tests that launch activities through ActivityScenario or Compose rules. Also wires Gradle/Bazel publishing, artifact validation, coalesced Javadocs, and a consumer-shaped Hilt fixture instrumentation test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b0862cb-279b-4d8c-9ab0-53f462a5037c
|
@Chang-Eric would you be the right person to review this, or could you redirect me to the current Hilt Android reviewer? This implements the convenience Hilt test activity discussed in #3394. |
|
@loganrosen I can review this. One high-level question here -- is it required/preferred for this to be a separate artifact rather than putting it in the existing |
|
@bcorso thanks, I appreciate it. I don't think a separate artifact is strictly required, but I chose it to keep the dependency shape narrow. The activity's manifest entry has to be merged into the target app/debug APK, so consumers need this on If we put this in The separate artifact is meant to mirror the AndroidX |
Fixes #3394.
Summary
com.google.dagger:hilt-android-testing-manifest, a small published AAR withdagger.hilt.android.testing.HiltComponentActivityand a manifest activity entry for Hilt Android tests.ActivityComponentaccess.Validation
:hilt-android-testing-manifest:assembleDebug:hilt-android-testing-manifest:apiCheck:hilt-android-testing-manifest:publishToMavenLocalbazelisk build --noshow_progress //hilt-android-testing-manifest:artifactbazelisk build --noshow_progress //:user-docs:app:assembleFreeDebug,:app:assembleFreeDebugAndroidTest,:app:assembleProDebug,:app:assembleProDebugAndroidTest:app:connectedFreeDebugAndroidTestfiltered todagger.hilt.android.simple.HiltComponentActivityTest