a

    amrelmasry

    3 years ago
    Kapt doesn't generate dagger code in androidTest folder:
    // build.gradle.kts
    plugins {
        id("kotlin-kapt")
    }
    
    dependencies {
        // ...
        kapt(Libs.DAGGER_PROCESSOR) // this works fine
        kaptAndroidTest(Libs.DAGGER_PROCESSOR) // this doesn't work
    }
    
    
    class Test { 
    
    @Module
    class DummyModule
    
    @Component(modules = [DummyModule::class])
    interface DummyComponent {
    
    }
    }
    I found the problem, dagger only works after the test is run https://github.com/chiuki/android-test-demo/issues/1