File tree 2 files changed +11
-3
lines changed
src/main/kotlin/com/tschuchort/compiletesting
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ dependencies {
36
36
// The Kotlin compiler should be near the end of the list because its .jar file includes
37
37
// an obsolete version of Guava
38
38
api " org.jetbrains.kotlin:kotlin-compiler-embeddable:$embedded_kotlin_version "
39
- implementation " org.jetbrains.kotlin:kotlin-annotation-processing-embeddable:$embedded_kotlin_version "
39
+ api " org.jetbrains.kotlin:kotlin-annotation-processing-embeddable:$embedded_kotlin_version "
40
40
}
41
41
42
42
compileKotlin {
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
52
52
/* * Arbitrary arguments to be passed to kapt */
53
53
var kaptArgs: MutableMap <OptionName , OptionValue > = mutableMapOf ()
54
54
55
+ /* * Arbitrary flags to be passed to kapt */
56
+ var kaptFlags: MutableSet <KaptFlag > = mutableSetOf ()
57
+
55
58
/* * Annotation processors to be passed to kapt */
56
59
var annotationProcessors: List <Processor > = emptyList()
57
60
@@ -370,8 +373,13 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
370
373
371
374
it.mode = AptMode .STUBS_AND_APT
372
375
373
- if (verbose)
374
- it.flags.addAll(KaptFlag .MAP_DIAGNOSTIC_LOCATIONS , KaptFlag .VERBOSE )
376
+ it.flags.apply {
377
+ addAll(kaptFlags)
378
+
379
+ if (verbose) {
380
+ addAll(KaptFlag .MAP_DIAGNOSTIC_LOCATIONS , KaptFlag .VERBOSE )
381
+ }
382
+ }
375
383
}
376
384
377
385
val compilerMessageCollector = PrintingMessageCollector (
You can’t perform that action at this time.
0 commit comments