mirror of
https://github.com/corda/corda.git
synced 2024-12-27 16:28:56 +00:00
d22cdac2dd
This improves the Java API and makes it more idiomatic. The methods were not moved to be static methods of the relevant types in all cases due to a bad interaction with a Kotlin auto-completion bug, and because static methods on interfaces are new in Java 8 and Kotlin is not yet emitting Java 8 bytecode. Also, introduce a packages.md file so packages can be documented.
40 lines
1.6 KiB
Groovy
40 lines
1.6 KiB
Groovy
apply plugin: 'org.jetbrains.dokka'
|
|
apply plugin: 'kotlin'
|
|
|
|
dependencies {
|
|
compile rootProject
|
|
}
|
|
|
|
dokka {
|
|
moduleName = 'corda'
|
|
outputDirectory = file("${rootProject.rootDir}/docs/build/html/api/kotlin")
|
|
processConfigurations = ['compile']
|
|
sourceDirs = files('../core/src/main/kotlin', '../client/jfx/src/main/kotlin', '../client/mock/src/main/kotlin', '../client/rpc/src/main/kotlin', '../node/src/main/kotlin', '../finance/src/main/kotlin', '../client/jackson/src/main/kotlin')
|
|
}
|
|
|
|
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
|
|
moduleName = 'corda'
|
|
outputFormat = "javadoc"
|
|
outputDirectory = file("${rootProject.rootDir}/docs/build/html/api/javadoc")
|
|
processConfigurations = ['compile']
|
|
sourceDirs = files('../core/src/main/kotlin', '../client/jfx/src/main/kotlin', '../client/mock/src/main/kotlin', '../client/rpc/src/main/kotlin', '../node/src/main/kotlin', '../finance/src/main/kotlin', '../client/jackson/src/main/kotlin')
|
|
includes = ['packages.md']
|
|
}
|
|
|
|
task buildDocs(dependsOn: ['apidocs', 'makeDocs'])
|
|
task apidocs(dependsOn: ['dokka', 'dokkaJavadoc'])
|
|
|
|
task makeDocs(type: Exec, dependsOn: ['installDocsiteRequirements']) {
|
|
// TODO: Non-msys Windows script
|
|
commandLine 'cmd', '/c', 'bash make-docsite.sh' // Windows
|
|
commandLine 'bash', './make-docsite.sh' // Linux
|
|
}
|
|
|
|
task installDocsiteRequirements(type: Exec) {
|
|
// TODO: Non-msys Windows script
|
|
commandLine 'cmd', '/c', 'bash install-docsite-requirements.sh' // Windows
|
|
commandLine 'bash', './install-docsite-requirements.sh' // Linux
|
|
}
|
|
|
|
apidocs.shouldRunAfter makeDocs
|