The `KaptOptions.Builder()` API has an argument fo...
# kapt
g
The
KaptOptions.Builder()
API has an argument for passing options to
javac
, but it expects
Map<String, String>
Does anyone know how you can pass arguments like
--enable-preview
which don't have an
-flag=X
value?
Copy code
public final class KaptOptions : org.jetbrains.kotlin.base.kapt3.KaptFlags {
   // ...
    public final class Builder public constructor() {
        // ...
        public final val javacOptions: kotlin.collections.MutableMap<kotlin.String, kotlin.String> /* compiled code */
I tried to search Github code usage and dug through hundreds of repos, but I couldn't find a single one which passes an argument like
--enable-preview
to
Kapt
1
t
try to pass empty value:
javac.put("--enable-preview", "")
g
Thank you -- this works! 🙏
I am going to submit a PR to
kotlin-compile-testing
library tonight that fixes proper passing of
javac
arguments to
kapt
tasks 🙌
👍 1