diff options
Diffstat (limited to 'dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts')
-rw-r--r-- | dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts new file mode 100644 index 00000000..8ef23d4b --- /dev/null +++ b/dokka-integration-tests/gradle/projects/it-sequential-tasks-execution-stress/build.gradle.kts @@ -0,0 +1,44 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +import org.jetbrains.dokka.gradle.DokkaTask +import org.jetbrains.dokka.gradle.kotlinSourceSet +import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.base.DokkaBaseConfiguration +import org.jetbrains.dokka.DokkaConfiguration +import java.net.URL + +plugins { + kotlin("jvm") + id("org.jetbrains.dokka") +} + +buildscript { + dependencies { + classpath("org.jetbrains.dokka:dokka-base:${System.getenv("DOKKA_VERSION")}") + } +} + +apply(from = "../template.root.gradle.kts") + +fun createTask(name: String) { + tasks.register(name, org.jetbrains.dokka.gradle.DokkaTask::class) { + dokkaSourceSets { + moduleName.set("Some example") + register("kotlin-stdlib-common") { + sourceRoots.from("src/main/java") + sourceRoots.from("src/main/kotlin") + samples.from("src/main/kotlin") + } + } + } +} + +task("runTasks") { + val taskNumber = (properties["task_number"] as String).toInt() + repeat(taskNumber) { i -> + createTask("task_"+i) + dependsOn ("task_"+i) + } +} |