mirror of
https://github.com/corda/corda.git
synced 2025-01-29 15:43:55 +00:00
run docs build as local user
This commit is contained in:
parent
1dcc1c6e05
commit
875d2eb02a
@ -1,3 +1,5 @@
|
|||||||
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
apply plugin: 'org.jetbrains.dokka'
|
apply plugin: 'org.jetbrains.dokka'
|
||||||
@ -23,7 +25,7 @@ def internalPackagePrefixes(sourceDirs) {
|
|||||||
ext {
|
ext {
|
||||||
// TODO: Add '../client/jfx/src/main/kotlin' and '../client/mock/src/main/kotlin' if we decide to make them into public API
|
// TODO: Add '../client/jfx/src/main/kotlin' and '../client/mock/src/main/kotlin' if we decide to make them into public API
|
||||||
dokkaSourceDirs = files('../core/src/main/kotlin', '../client/rpc/src/main/kotlin', '../finance/workflows/src/main/kotlin', '../finance/contracts/src/main/kotlin', '../client/jackson/src/main/kotlin',
|
dokkaSourceDirs = files('../core/src/main/kotlin', '../client/rpc/src/main/kotlin', '../finance/workflows/src/main/kotlin', '../finance/contracts/src/main/kotlin', '../client/jackson/src/main/kotlin',
|
||||||
'../testing/test-utils/src/main/kotlin', '../testing/node-driver/src/main/kotlin')
|
'../testing/test-utils/src/main/kotlin', '../testing/node-driver/src/main/kotlin')
|
||||||
internalPackagePrefixes = internalPackagePrefixes(dokkaSourceDirs)
|
internalPackagePrefixes = internalPackagePrefixes(dokkaSourceDirs)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,13 +66,11 @@ task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
|
|||||||
task buildDocs(dependsOn: ['apidocs', 'makeDocs'])
|
task buildDocs(dependsOn: ['apidocs', 'makeDocs'])
|
||||||
task apidocs(dependsOn: ['dokka', 'dokkaJavadoc'])
|
task apidocs(dependsOn: ['dokka', 'dokkaJavadoc'])
|
||||||
|
|
||||||
task makeDocs(type: Exec, dependsOn: ['ensureBuildFolderPresent']) {
|
task makeDocs(type: Exec) {
|
||||||
commandLine "docker", "run", "-v", "${project.projectDir}:/opt/docs_builder", "corda/docs-builder:latest", "bash", "-c", "make-docsite.sh"
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
}
|
commandLine "docker", "run", "-v", "${project.projectDir}:/opt/docs_builder", "corda/docs-builder:latest", "bash", "-c", "make-docsite.sh"
|
||||||
|
} else {
|
||||||
task ensureBuildFolderPresent{
|
commandLine "bash", "-c", "docker run --rm --user \$(id -u):\$(id -g) -v ${project.projectDir}:/opt/docs_builder corda/docs-builder:latest bash -c make-docsite.sh"
|
||||||
doLast{
|
|
||||||
Files.createDirectories(new File(project.buildDir, "html").toPath())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user