Report messages from kapt using MessageCollector

This allows to print messages when daemon is used.
System out is not copied to daemon client,
because multiple compilations can occur in parallel.
This commit is contained in:
Alexey Tsvetkov
2016-11-23 16:37:08 +03:00
parent b39cefe5d1
commit 865c6d887c
7 changed files with 54 additions and 20 deletions
@@ -75,7 +75,8 @@ abstract class BaseGradleIT {
val androidHome: File? = null,
val androidGradlePluginVersion: String? = null,
val forceOutputToStdout: Boolean = false,
val debug: Boolean = false)
val debug: Boolean = false,
val freeCommandLineArgs: List<String> = emptyList())
open inner class Project(
val projectName: String,
@@ -280,6 +281,7 @@ abstract class BaseGradleIT {
if (options.debug) {
add("-Dorg.gradle.debug=true")
}
addAll(options.freeCommandLineArgs)
}
private fun Project.createEnvironmentVariablesMap(options: BuildOptions): Map<String, String> =
@@ -32,7 +32,8 @@ class Kapt3IT : BaseGradleIT() {
private fun androidBuildOptions() =
BuildOptions(withDaemon = true,
androidHome = File("../../../dependencies/android-sdk-for-tests"),
androidGradlePluginVersion = ANDROID_GRADLE_PLUGIN_VERSION)
androidGradlePluginVersion = ANDROID_GRADLE_PLUGIN_VERSION,
freeCommandLineArgs = listOf("-Pkapt.verbose=true"))
override fun defaultBuildOptions(): BuildOptions =
super.defaultBuildOptions().copy(withDaemon = true)