@@ -96,7 +96,7 @@ class KotlinCompilation {
9696 var allWarningsAsErrors: Boolean = false
9797
9898 /* * Report locations of files generated by the compiler */
99- var reportOutputFiles: Boolean = verbose
99+ var reportOutputFiles: Boolean by default { verbose }
100100
101101 /* * Report on performance of the compilation */
102102 var reportPerformance: Boolean = false
@@ -213,7 +213,7 @@ class KotlinCompilation {
213213 * (on JDK8) or --system none (on JDK9+). This can be useful if all
214214 * the JDK classes you need are already on the (inherited) classpath.
215215 * */
216- var jdkHome: File ? = getJdkHome()
216+ var jdkHome: File ? by default { getJdkHome() }
217217
218218 /* *
219219 * Path to the kotlin-stdlib.jar
@@ -399,7 +399,6 @@ class KotlinCompilation {
399399 it.allWarningsAsErrors = allWarningsAsErrors
400400 it.reportOutputFiles = reportOutputFiles
401401 it.reportPerf = reportPerformance
402- it.reportOutputFiles = reportOutputFiles
403402 }
404403
405404 /* * Performs the 1st and 2nd compilation step to generate stubs and run annotation processors */
@@ -420,7 +419,9 @@ class KotlinCompilation {
420419 }
421420
422421 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 )
424425 }
425426
426427 /* The kapt compiler plugin (KaptComponentRegistrar)
@@ -474,13 +475,12 @@ class KotlinCompilation {
474475
475476 val k2JvmArgs = commonK2JVMArgs().also {
476477 it.freeArgs = sourcePaths
477-
478478 it.pluginClasspaths = (it.pluginClasspaths?.toList() ? : emptyList<String >() + getResourcesPath())
479479 .distinct().toTypedArray()
480480 }
481481
482482 val compilerMessageCollector = PrintingMessageCollector (
483- internalMessageStream, MessageRenderer .WITHOUT_PATHS , true
483+ internalMessageStream, MessageRenderer .GRADLE_STYLE , verbose
484484 )
485485
486486 return convertKotlinExitCode(
@@ -522,7 +522,7 @@ class KotlinCompilation {
522522 }
523523
524524 val compilerMessageCollector = PrintingMessageCollector (
525- internalMessageStream, MessageRenderer .WITHOUT_PATHS , true
525+ internalMessageStream, MessageRenderer .GRADLE_STYLE , verbose
526526 )
527527
528528 return convertKotlinExitCode(
0 commit comments