Kapt: Provide SourceRetentionAnnotationHandler for incremental compilation.

Collect annotations with the "SOURCE" retention.
(cherry picked from commit 6ef66e7)
This commit is contained in:
Yan Zhulanow
2016-09-02 20:15:32 +03:00
committed by Yan Zhulanow
parent c3ae66bc9c
commit 975364b2ed
17 changed files with 217 additions and 26 deletions
@@ -0,0 +1,42 @@
@Retention(AnnotationRetention.SOURCE)
annotation class Source1
@Retention(AnnotationRetention.SOURCE)
annotation class Source2
@Retention(AnnotationRetention.SOURCE)
annotation class Source3
@Retention(AnnotationRetention.SOURCE)
annotation class Source4
@Retention(AnnotationRetention.BINARY)
annotation class Binary
@Retention(AnnotationRetention.RUNTIME)
annotation class Runtime
@Source1
class Test
class Test2 {
@Source2
fun t() {}
}
class Test3 {
@field:Source3
val p: String = "A"
}
class Test4 {
fun t(@Source4 a: String) {}
}
class Test5 {
@Retention(AnnotationRetention.SOURCE)
annotation class Source5
@Source5
fun t() {}
}