Skip to content

Commit 8fc0075

Browse files
committed
Fixed site generation (paths & build script)
1 parent 185a387 commit 8fc0075

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ configure(subprojects.findAll { !unpublished.contains(it.name) }) {
142142
jdkVersion = 8
143143
includes = ['README.md']
144144
linkMapping {
145+
def relPath = rootProject.projectDir.toPath().relativize(projectDir.toPath())
145146
dir = "$projectDir/src/main/kotlin"
146-
url = "http://github.com/kotlin/kotlinx.coroutines/tree/master/${project.name}/src/main/kotlin"
147+
url = "http://github.com/kotlin/kotlinx.coroutines/tree/master/$relPath/src/main/kotlin"
147148
suffix = "#L"
148149
}
149150
}

site/build.gradle

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11

2-
task copyDocs(dependsOn: rootProject.getTasksByName("dokka", true)) {
3-
copy {
4-
from rootProject.getTasksByName("dokka", true).collect { "$it.project.buildDir/dokka" }
2+
task copyDocs(type: Copy, dependsOn: rootProject.getTasksByName("dokka", true)) {
3+
from (rootProject.getTasksByName("dokka", true).collect { "$it.project.buildDir/dokka" }) {
54
include "**/*.md"
6-
into "$buildDir/gh-pages"
7-
}
8-
copy {
9-
from "docs"
10-
into "$buildDir/gh-pages"
115
}
6+
from "docs"
7+
into "$buildDir/gh-pages"
128
}
139

1410
task site(type: Exec, description: 'Generate github pages', dependsOn: copyDocs) {

0 commit comments

Comments
 (0)