https://kotlinlang.org logo
#android
Title
# android
n

nemi

07/10/2017, 3:32 AM
The reason I think the issue is around stub generation, is because if I declare an empty interface (even if it is in kotlin), make the dao interface extend this empty interface and only reference the empty interface in the dagger module method signatures, I don’t get an error
l

lovis

07/10/2017, 7:44 AM
nemi: are you just using kapt, or do you
apply plugin: 'kotlin-kapt'
?
n

nemi

07/10/2017, 7:44 AM
hey Lovis, I’m using kotlin-kapt
l

lovis

07/10/2017, 7:45 AM
ok. and do you use
kapt { generateStubs true }
? because that’s basically “forbidden” for kapt3
n

nemi

07/10/2017, 8:06 AM
nope, not using it
l

lovis

07/10/2017, 8:49 AM
you’re not using the
internal
modifier by any chance? because that means “in module only”
I have this “something with kapt doesn’t work” check list, but maybe I need to add a new point to it, since it doesn’t work for you: https://gist.github.com/lmller/3c43eff454f7508474210fb2491b488a
n

nemi

07/10/2017, 8:54 AM
If I don’t reference the interface spit out by the annotation processor in the dagger module, everything compiles. So I really think that the stubs are not generated. If I add another module to the project on which the AP runs and I consume the generated classes in the APP module everything is fun
fun -> fine
l

lovis

07/11/2017, 8:30 AM
does 1.3.2 fix your issue? it says it fixes ? “Syntax error while generating kapt stubs”
n

nemi

07/13/2017, 11:29 PM
I am using 1.1.3-2, but it’s all the same unfortunately
l

lovis

07/14/2017, 7:17 AM
sorry I couldn’t help 😞 maybe file a bug
n

nemi

07/17/2017, 1:42 AM
No worries, thank you for your time!. I have raised a bug in parallel but did not get any answer that really moves things forward. For the time being I can work around the issue easily in a way that’s not hacky but it might make things more difficult in the long run.