blob: f180628f1d5cd7c2fba0986014a63137de221f25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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")
dependencies {
implementation(kotlin("stdlib"))
}
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)
}
}
|