I declared repeatable annotation @Parameterin
kotlin as below:
@Repeatable
annotation class Parameter(val name: String);
but when I use it as below, the compiler reports an error:
Only annotations preserving SOURCE can be repeated in JVM versions up to 1.8
@Parameter("foo")
@Parameter("bar")
fun repeat() = 1;
I am sure that I work with jdk-8in
Kotlin . and the option is jvmTargetalso set to 1.8for the kotlin-1.1.2gradle plugin.
Q: Why is this not working fine?
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileKotlin {
kotlinOptions{
jvmTarget = "1.8"
}
}
source
share