maylo0852
05/27/2025, 1:33 PMreplaces
in a separate android test module (apply com.android.test) ?
@Module
@ContributesTo(
scope = AppScope::class,
replaces = [ActualModule::class],
)
object TestActualModule {
@Provides
@SingleIn(AppScope::class)
fun providesTestImpl(): TestImpl = TestImpl()
}
Anvil correctly generates Factory class for this, but it's not contributed in the DaggerAppComponent
Joel Wilcox
05/28/2025, 12:11 AMTestActualModule
not being picked up before the graph is mergedmaylo0852
06/08/2025, 11:03 AMkapt(dagger)
in the test module, which means TestComponent
was not generated. It was working within app/androidTest, but for other modules I use anvil compiler, so I was blindly copying w/o thinking.
anvil { generateDaggerFactories = true }
I appreciate you getting back to me though!