https://kotlinlang.org logo
Title
a

Alexey Anufriev

02/26/2020, 4:47 PM
can I use kapt to run java annotation processors over java source code only? when I am trying to do this I always get:
[WARNING] No sources found skipping Kotlin compile
t

tschuchort

02/26/2020, 5:38 PM
No, it will abort when there are no Kotlin sources. But you can just pass an empty Kotlin source file. I do that in my kotlin-compile-testing library
a

Alexey Anufriev

02/26/2020, 5:40 PM
that could be an option, but I would say this case must be supported
I am trying to adopt kotlin in my project but I already have a lot of legacy code generation
so once I reconfigure maven (which is required for java/kotlin projects) I need to keep codegen as it was
I will make a PR to improve this
t

tschuchort

02/26/2020, 6:51 PM
Perhaps it's possible somehow. But I didn't bother since this hack works perfectly well. There are experimental Java options for the compiler that might work, but in my experience those are very buggy.
g

gildor

03/04/2020, 3:13 PM
Maybe better would be use apt if you have Java only sources in some modules, it would be also faster
a

Alexey Anufriev

03/04/2020, 3:14 PM
in fact I would like to have it unified, and I also tweaked kapt a bit, hope it will be merged at some point
g

gildor

03/04/2020, 3:40 PM
Tweaked kapt? I think faster builds (especially slowest part of the build) worth a lot more than unified config
a

Alexey Anufriev

03/04/2020, 3:41 PM
for my case not, I would not like to migrate each subproject in my company one by one