fix: missing jsdoc files
This commit is contained in:
parent
bd552751f5
commit
d985d1be0c
13 changed files with 246 additions and 102 deletions
27
build.gradle
27
build.gradle
|
@ -13,7 +13,7 @@ apply plugin: 'application'
|
|||
|
||||
version = new Date().format("yyyyMMdd")
|
||||
|
||||
tasks.build.dependsOn javadoc
|
||||
tasks.build.dependsOn javadoc, 'jsdoc'
|
||||
tasks.compileJava.dependsOn 'processSource'
|
||||
|
||||
sourceSets {
|
||||
|
@ -85,7 +85,12 @@ applicationDistribution.from(projectDir) {
|
|||
|
||||
applicationDistribution.from(javadoc.destinationDir) {
|
||||
include '**'
|
||||
into 'docs'
|
||||
into 'docs/javadoc'
|
||||
}
|
||||
|
||||
applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
|
||||
include '**'
|
||||
into 'docs/jsdoc'
|
||||
}
|
||||
|
||||
distTar {
|
||||
|
@ -93,7 +98,7 @@ distTar {
|
|||
}
|
||||
|
||||
installDist {
|
||||
dependsOn javadoc
|
||||
dependsOn javadoc, 'jsdoc'
|
||||
finalizedBy 'update'
|
||||
}
|
||||
|
||||
|
@ -161,6 +166,22 @@ task update {
|
|||
}
|
||||
}
|
||||
|
||||
task jsdoc(type: Exec) {
|
||||
def sources = ['modules/core', 'modules/helma', 'modules/jala/code']
|
||||
def destination = "${project.buildDir}/docs/jsdoc"
|
||||
|
||||
sources.each { dir -> inputs.dir dir }
|
||||
outputs.dir destination
|
||||
|
||||
executable 'npx'
|
||||
args = ['jsdoc', '-d', "$destination"].plus(sources)
|
||||
|
||||
// As of writing jsdoc throws the following error:
|
||||
// Unable to parse /home/tobi/Projects/helma/current/modules/jala/code/Database.js: Unexpected token, expected "(" (844:10)
|
||||
// Seems to be related to the `for each` syntax but did not find any further references.
|
||||
ignoreExitValue true
|
||||
}
|
||||
|
||||
task shell(type: JavaExec) {
|
||||
def rhinoJar = configurations.library.files.find { f ->
|
||||
f.name.startsWith('rhino')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue