architecture-samples icon indicating copy to clipboard operation
architecture-samples copied to clipboard

gradlew test fails with "Unresolved reference: HiltTestActivity"

Open dturner opened this issue 3 years ago • 1 comments

Relevant log output:

> Task :app:compileReleaseUnitTestKotlin FAILED
e: /Users/donturner/Code/workspace-android/architecture-samples/app/src/sharedTest/java/com/example/android/architecture/blueprints/todoapp/addedittask/AddEditTaskScreenTest.kt: (32, 60): Unresolved reference: HiltTestActivity

This is because HiltTestActivity is defined only for the debug source set so is not available for release builds.

dturner avatar Aug 16 '22 18:08 dturner

Discussed with Jose, agreed that the test task should only run testDebug (not testRelease)

dturner avatar Aug 18 '22 13:08 dturner