Hi, I’m trying to use command line compile with kapt plugin
I’m not sure how to specify the command line arguments appropriately. What I’m doing is giving me the error below (and I get the same error explicitly specifying the plugin id and options).
Any pointers / examples on using plugins with kotlinc ?
Thanks, Rob.
kotlinc -d target -cp ~/.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar -Xplugin /home/rob/.m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing/1.0.4/kotlin-annotation-processing-1.0.4.jar main/java/
exception: java.lang.AbstractMethodError: org.jetbrains.kotlin.annotation.processing.AnnotationProcessingComponentRegistrar.registerProjectComponents(Lcom/intellij/mock/MockProject;Lorg/jetbrains/kotlin/config/CompilerConfiguration;)V
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.(KotlinCoreEnvironment.kt:153)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.(KotlinCoreEnvironment.kt:98)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:301)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:228)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:194)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:199)
at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:154)
at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:66)
at org.jetbrains.kotlin.cli.common.CLICompiler.doMainNoExit(CLICompiler.java:305)
at org.jetbrains.kotlin.cli.common.CLICompiler.doMain(CLICompiler.java:295)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:262)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:73)
at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:35)