kotlin @SupportedAnnotationTypes("com.example.MyAnnotation") @SupportedSourceVersion(SourceVersion.RELEASE_8) class MyProcessor : AbstractProcessor() { override fun process(annotations: Set<TypeElement>, roundEnv: AnnotationValue, annotatedTypes: Set<TypeElement>) { } } groovy plugins { id 'java-library' id 'kotlin-kapt' } dependencies { implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' kapt 'com.google.auto.service:auto-service:1.0-rc7' } kapt { arguments { arg("kapt.kotlin.generated", file("kaptKotlin").absolutePath) } }


上一篇:
下一篇:
切换中文