https://kotlinlang.org logo
#kapt
Title
# kapt
p

pavlospt

03/27/2017, 11:45 AM
Is there any way to tell kapt Compiler to compile with specific compiler args?
e

Eugenio

03/27/2017, 11:48 AM
in the old kapt (kapt1) you can do this, I'm not sure about the new one (kapt3):
Copy code
kapt {
    arguments {
        arg('key', 'value')
    }
}
ping @pavlospt ^
p

pavlospt

03/27/2017, 11:48 AM
Yeap, that’s what I have tried, but not working
Kapt3 seems to have something called options
Although Gradle cannot find kapt3 {} which doesnt allow me to even try that “options"
e

Eugenio

03/27/2017, 11:49 AM
no no it would always be
kapt
p

pavlospt

03/27/2017, 11:50 AM
so should I try with options keyword then?
e

Eugenio

03/27/2017, 11:53 AM
try
p

pavlospt

03/27/2017, 11:53 AM
seems that it is apoptions for kapt3
But i am not sure if it is compiler options
or just annotation processing options
e

Eugenio

03/27/2017, 11:54 AM
ah wait a second, what I was telling you before was annotation processing options
for compiler options, I think kapt3 mirrors the ones from the main compilation task
not sure if you can specify different ones
p

pavlospt

03/27/2017, 11:56 AM
We used to have a closure that would increase the Xmaxerrs to 5000
in order to be able to read when Dagger was failing and as a result Databinding was failing as well
seems that after upgrading to 1.1
this one stopped working
and so if we get a failure on kaptVariantNameKotlin for the :app module
it only prints 99 errors
That’s why i am thinking it has to do with the compiler being used by Kapt
e

Eugenio

03/27/2017, 12:02 PM
ah I see
p

pavlospt

03/27/2017, 3:24 PM
I am using kotlin-android plugin
apparently it doesnt
But there is no ETA available
@yan Is there a way to build and test it?
e

Eugenio

03/29/2017, 12:35 PM
also @yan what @pavlospt meant are not annotation processing arguments, but compiler arguments for kapt3
p

pavlospt

03/29/2017, 12:36 PM
@Eugenio I suppose that he understood, because he is the one who originally reported the issue I sent above 😛
But this is just a guess, so thanks for mentioning it explicitly!
e

Eugenio

03/29/2017, 12:38 PM
but the example he linked is about the annotation processing arguments
that's why I specified it, I was also confused at the beginning
p

pavlospt

03/29/2017, 12:40 PM
Yeap, that was weird 😛