From 84255e22aac2a71eeb8166d0cac960aa7b6cf25b Mon Sep 17 00:00:00 2001 From: Adam Semenenko <152864218+adam-enko@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:33:26 +0100 Subject: [PATCH] register DOKKA_TEST_OUTPUT_PATH as a test task input, and the dir as an output --- dokka-integration-tests/gradle/build.gradle.kts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index da21becad1..ae4e126af3 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -173,6 +173,14 @@ fun TestingExtension.registerTestProjectSuite( if (jvm != null) { javaLauncher = javaToolchains.launcherFor { languageVersion = jvm } } + + // For validation on CI the output is uploaded. This requires the test task is not skipped, and + // so Gradle must be told about the output dir. + val testOutputPath = System.getenv("DOKKA_TEST_OUTPUT_PATH") + inputs.property("testOutputPath", testOutputPath) + if (testOutputPath != null) { + outputs.dir(testOutputPath).withPropertyName("testOutput") + } } } configure()