I want to use the new Vector API from a Kotlin project using a Gradle build.
I tried this:
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
kotlinOptions.freeCompilerArgs = listOf("--add-modules", "jdk.incubator.vector")
}
Result is:
Invalid argument: --add-modules
I've checked and the right SDK is being used, and help for javac at least shows --add-modules
as a valid flag, so what I guess is going on is, this is the Kotlin compiler, and I need to provide a different flag, or some kind of prefixed flag to add a module to the classpath. What is the magic incantation here?