https://kotlinlang.org logo
#announcements
Title
# announcements
j

joshuaavalon

08/16/2017, 8:59 AM
I tired to use Dagger with Kotlin. I noticed that class are not generated. When I run Gradle in command line I get "'kapt.generate stubs' is not used by the 'kotlin-kapt' plugin". Anyone know why?
g

gildor

08/16/2017, 9:01 AM
Remove
kapt.generate stubs
from your build.gradle. It’s not needed anymore But it’s just warning, not an error. Try to build and check your build logs
j

joshuaavalon

08/16/2017, 9:42 AM
I find out that the Class is generated but not show in Intellij. If I tried
DaggerClassCopoment
, it cannot reference the class
g

gildor

08/16/2017, 9:46 AM
Is it Java project?
j

joshuaavalon

08/16/2017, 9:46 AM
It is a Kotlin and Gradle project (not Android)
I can see the class in /build/generated/source/kapt/package/. But I cannot reference it even with full name.
g

gildor

08/16/2017, 9:49 AM
Yes, that what I mean. You should add idea gradle plugin and add generated dir to sourceSets. Cannot find code snippet fast, try to google it
j

joshuaavalon

08/16/2017, 9:56 AM
Thx, I just added the sourceSets myself
😀