aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/gradle/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests/gradle/build.gradle.kts')
-rw-r--r--integration-tests/gradle/build.gradle.kts19
1 files changed, 13 insertions, 6 deletions
diff --git a/integration-tests/gradle/build.gradle.kts b/integration-tests/gradle/build.gradle.kts
index fb5e5739..2c526af7 100644
--- a/integration-tests/gradle/build.gradle.kts
+++ b/integration-tests/gradle/build.gradle.kts
@@ -1,15 +1,22 @@
+import org.jetbrains.invokeWhenEvaluated
+
dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("test-junit"))
implementation(gradleTestKit())
}
-tasks {
- test {
- inputs.dir(file("projects"))
+val integrationTest by tasks.integrationTest
+integrationTest.inputs.dir(file("projects"))
- rootProject.allprojects
- .mapNotNull { project -> project.tasks.findByName("publishToMavenLocal") }
- .forEach { publishTask -> this.dependsOn(publishTask) }
+rootProject.allprojects.forEach { otherProject ->
+ otherProject.invokeWhenEvaluated { evaluatedProject ->
+ evaluatedProject.tasks.findByName("publishToMavenLocal")?.let { publishingTask ->
+ integrationTest.dependsOn(publishingTask)
+ }
}
}
+
+tasks.clean {
+ delete(File(buildDir, "gradle-test-kit"))
+}