aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/gradle/projects/it-multimodule-versioning-0/build.gradle
blob: e04e412bdba7146813953602cfaeebe520c5c5d1 (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
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask

plugins {
    id 'org.jetbrains.kotlin.jvm'
    id("org.jetbrains.dokka")
}

apply from: '../template.root.gradle.kts'

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib"
    dokkaPlugin "org.jetbrains.dokka:versioning-plugin:${System.getenv("DOKKA_VERSION")}"
}


subprojects {
    apply plugin: 'org.jetbrains.kotlin.jvm'
    apply plugin: 'org.jetbrains.dokka'
}

dokkaHtmlMultiModule {
    pluginsMapConfiguration.set(["org.jetbrains.dokka.versioning.VersioningPlugin": """{ "version": "1.2", "olderVersionsDir": "$projectDir/dokkas" }"""])
}

tasks.register('dokkaHtmlMultiModuleBaseVersion', DokkaMultiModuleTask){
    dependencies {
        dokkaPlugin("org.jetbrains.dokka:all-modules-page-plugin:${System.getenv("DOKKA_VERSION")}")
        dokkaPlugin("org.jetbrains.dokka:versioning-plugin:${System.getenv("DOKKA_VERSION")}")
    }
    outputDirectory.set(file(projectDir.toPath().resolve("dokkas").resolve("1.0")))
    pluginsMapConfiguration.set(["org.jetbrains.dokka.versioning.VersioningPlugin": """{ "version": "1.0" }"""])
    addChildTasks([project(":first"), project(":second")], "dokkaHtmlPartial")
}

tasks.register('dokkaHtmlMultiModuleNextVersion', DokkaMultiModuleTask){
    dependencies {
        dokkaPlugin("org.jetbrains.dokka:all-modules-page-plugin:${System.getenv("DOKKA_VERSION")}")
        dokkaPlugin("org.jetbrains.dokka:versioning-plugin:${System.getenv("DOKKA_VERSION")}")
    }
    outputDirectory.set(file(projectDir.toPath().resolve("dokkas").resolve("1.1")))
    pluginsMapConfiguration.set(["org.jetbrains.dokka.versioning.VersioningPlugin": """{ "version": "1.1", "olderVersionsDir": "$projectDir/dokkas" }"""])
    addChildTasks([project(":first"), project(":second")], "dokkaHtmlPartial")
}