In my Android project I have a Gradle java-library module which I use to provide a utility class that doesn't need a dependency on Android SDK. The module contains the interface for the utility, internal implementation class and the Hilt module with @InstallIn(SingletonComponent::class) annotation that binds the implementation to the interface; it has dependency on hilt-core java-only artifact.
What I want to do is to add testFixtures source set to the module and within it create test implementation and test module annotated with @TestInstallIn. However, @TestInstallIn annotation is provided as a part of hilt-android-testing artifact, which is an Android artifact (aar). Therefore I cannot attach it to the java-library project.
What I'd expect is to have another dependency, let's say hilt-core-testing, that only provides the @TestInstallIn annotation, and the dependency is served as a jar.
In my Android project I have a Gradle java-library module which I use to provide a utility class that doesn't need a dependency on Android SDK. The module contains the interface for the utility, internal implementation class and the Hilt module with
@InstallIn(SingletonComponent::class)
annotation that binds the implementation to the interface; it has dependency onhilt-core
java-only artifact.What I want to do is to add testFixtures source set to the module and within it create test implementation and test module annotated with
@TestInstallIn
. However,@TestInstallIn
annotation is provided as a part ofhilt-android-testing
artifact, which is an Android artifact (aar). Therefore I cannot attach it to the java-library project.What I'd expect is to have another dependency, let's say
hilt-core-testing
, that only provides the@TestInstallIn
annotation, and the dependency is served as a jar.