@@ -96,7 +96,7 @@ class KotlinCompilation {
96
96
var allWarningsAsErrors: Boolean = false
97
97
98
98
/* * Report locations of files generated by the compiler */
99
- var reportOutputFiles: Boolean = verbose
99
+ var reportOutputFiles: Boolean by default { verbose }
100
100
101
101
/* * Report on performance of the compilation */
102
102
var reportPerformance: Boolean = false
@@ -213,7 +213,7 @@ class KotlinCompilation {
213
213
* (on JDK8) or --system none (on JDK9+). This can be useful if all
214
214
* the JDK classes you need are already on the (inherited) classpath.
215
215
* */
216
- var jdkHome: File ? = getJdkHome()
216
+ var jdkHome: File ? by default { getJdkHome() }
217
217
218
218
/* *
219
219
* Path to the kotlin-stdlib.jar
@@ -399,7 +399,6 @@ class KotlinCompilation {
399
399
it.allWarningsAsErrors = allWarningsAsErrors
400
400
it.reportOutputFiles = reportOutputFiles
401
401
it.reportPerf = reportPerformance
402
- it.reportOutputFiles = reportOutputFiles
403
402
}
404
403
405
404
/* * Performs the 1st and 2nd compilation step to generate stubs and run annotation processors */
@@ -420,7 +419,9 @@ class KotlinCompilation {
420
419
}
421
420
422
421
it.mode = AptMode .STUBS_AND_APT
423
- it.flags.add(KaptFlag .MAP_DIAGNOSTIC_LOCATIONS )
422
+
423
+ if (verbose)
424
+ it.flags.addAll(KaptFlag .MAP_DIAGNOSTIC_LOCATIONS , KaptFlag .VERBOSE )
424
425
}
425
426
426
427
/* The kapt compiler plugin (KaptComponentRegistrar)
@@ -474,13 +475,12 @@ class KotlinCompilation {
474
475
475
476
val k2JvmArgs = commonK2JVMArgs().also {
476
477
it.freeArgs = sourcePaths
477
-
478
478
it.pluginClasspaths = (it.pluginClasspaths?.toList() ? : emptyList<String >() + getResourcesPath())
479
479
.distinct().toTypedArray()
480
480
}
481
481
482
482
val compilerMessageCollector = PrintingMessageCollector (
483
- internalMessageStream, MessageRenderer .WITHOUT_PATHS , true
483
+ internalMessageStream, MessageRenderer .GRADLE_STYLE , verbose
484
484
)
485
485
486
486
return convertKotlinExitCode(
@@ -522,7 +522,7 @@ class KotlinCompilation {
522
522
}
523
523
524
524
val compilerMessageCollector = PrintingMessageCollector (
525
- internalMessageStream, MessageRenderer .WITHOUT_PATHS , true
525
+ internalMessageStream, MessageRenderer .GRADLE_STYLE , verbose
526
526
)
527
527
528
528
return convertKotlinExitCode(
0 commit comments