Stream Gradle output when autodebugging is enabled
^KT-70493
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt
index 2c59eef..c29a73f 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt
@@ -86,7 +86,7 @@
projectName: String,
gradleVersion: GradleVersion,
buildOptions: BuildOptions = defaultBuildOptions,
- forceOutput: Boolean = false,
+ forceOutput: EnableGradleDebug = EnableGradleDebug.AUTO,
enableBuildScan: Boolean = false,
addHeapDumpOptions: Boolean = true,
enableGradleDebug: EnableGradleDebug = EnableGradleDebug.AUTO,
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/testDsl.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/testDsl.kt
index 1485a78..04c4d8f 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/testDsl.kt
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/testDsl.kt
@@ -45,7 +45,7 @@
projectName: String,
gradleVersion: GradleVersion,
buildOptions: BuildOptions = defaultBuildOptions,
- forceOutput: Boolean = false,
+ forceOutput: EnableGradleDebug = EnableGradleDebug.AUTO,
enableBuildScan: Boolean = false,
addHeapDumpOptions: Boolean = true,
enableGradleDebug: EnableGradleDebug = EnableGradleDebug.AUTO,
@@ -123,7 +123,7 @@
projectName: String,
gradleVersion: GradleVersion,
buildOptions: BuildOptions = defaultBuildOptions,
- forceOutput: Boolean = false,
+ forceOutput: EnableGradleDebug = EnableGradleDebug.AUTO,
enableBuildScan: Boolean = false,
addHeapDumpOptions: Boolean = true,
enableGradleDebug: EnableGradleDebug = EnableGradleDebug.AUTO,
@@ -163,7 +163,7 @@
*/
fun TestProject.build(
vararg buildArguments: String,
- forceOutput: Boolean = this.forceOutput,
+ forceOutput: EnableGradleDebug = this.forceOutput,
enableGradleDebug: EnableGradleDebug = this.enableGradleDebug,
kotlinDaemonDebugPort: Int? = this.kotlinDaemonDebugPort,
enableBuildCacheDebug: Boolean = false,
@@ -192,7 +192,7 @@
kotlinDaemonDebugPort
)
val gradleRunnerForBuild = gradleRunner
- .also { if (forceOutput) it.forwardOutput() }
+ .also { if (forceOutput.toBooleanFlag()) it.forwardOutput() }
.also { if (environmentVariables.environmentalVariables.isNotEmpty()) it.withEnvironment(System.getenv() + environmentVariables.environmentalVariables) }
.withDebug(enableGradleDebug.toBooleanFlag())
.withArguments(allBuildArguments)
@@ -209,7 +209,7 @@
*/
fun TestProject.buildAndFail(
vararg buildArguments: String,
- forceOutput: Boolean = this.forceOutput,
+ forceOutput: EnableGradleDebug = this.forceOutput,
enableGradleDebug: EnableGradleDebug = this.enableGradleDebug,
kotlinDaemonDebugPort: Int? = this.kotlinDaemonDebugPort,
enableBuildCacheDebug: Boolean = false,
@@ -234,7 +234,7 @@
kotlinDaemonDebugPort
)
val gradleRunnerForBuild = gradleRunner
- .also { if (forceOutput) it.forwardOutput() }
+ .also { if (forceOutput.toBooleanFlag()) it.forwardOutput() }
.also { if (environmentVariables.environmentalVariables.isNotEmpty()) it.withEnvironment(System.getenv() + environmentVariables.environmentalVariables) }
.withDebug(enableGradleDebug.toBooleanFlag())
.withArguments(allBuildArguments)
@@ -392,7 +392,7 @@
projectPath: Path,
val buildOptions: BuildOptions,
val gradleVersion: GradleVersion,
- val forceOutput: Boolean,
+ val forceOutput: EnableGradleDebug,
val enableBuildScan: Boolean,
val enableGradleDaemonMemoryLimitInMb: Int?,
val enableKotlinDaemonMemoryLimitInMb: Int?,