forked from Kotlin/kotlinx.coroutines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
28 lines (22 loc) · 834 Bytes
/
build.gradle
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
def buildDocsDir = "$buildDir/docs"
task copyDocs(type: Copy, dependsOn: rootProject.getTasksByName("dokka", true)) {
from (rootProject.getTasksByName("dokka", true).collect { "$it.project.buildDir/dokka" }) {
include "**/*.md"
}
from "docs"
into buildDocsDir
}
task copyExampleFrontendJs(type: Copy, dependsOn: ':example-frontend-js:bundle') {
def srcBuildDir = project(':example-frontend-js').buildDir
from "$srcBuildDir/dist"
into "$buildDocsDir/example-frontend-js"
}
task site(type: Exec, description: 'Generate github pages', dependsOn: [copyDocs, copyExampleFrontendJs]) {
inputs.files(fileTree(buildDocsDir))
outputs.dir("$buildDir/dist")
workingDir file(buildDocsDir)
commandLine 'bundle', 'exec', 'jekyll', 'build'
}
task clean(type: Delete) {
delete buildDir
}