Skip to content

Commit

Permalink
refine javadoc build script
Browse files Browse the repository at this point in the history
  • Loading branch information
DevChu authored and jumperchen committed Sep 5, 2023
1 parent 5599a50 commit e92067c
Showing 1 changed file with 20 additions and 44 deletions.
64 changes: 20 additions & 44 deletions javadoc.gradle
Original file line number Diff line number Diff line change
@@ -1,48 +1,6 @@
// Script for build javadoc and jsdoc

def currentYear = new Date().format("yyyy")
def javadocClassPath = files(
"$rootDir/dist/lib/zcommons-el.jar",
"$rootDir/dist/lib/ext/slf4j-api.jar",
"$rootDir/dist/lib/ext/servlet-api.jar",
"$rootDir/dist/lib/ext/jython.jar",
"$rootDir/dist/lib/ext/js.jar",
"$rootDir/dist/lib/ext/jruby.jar",
"$rootDir/dist/lib/ext/bsh.jar",
"$rootDir/dist/lib/ext/guava.jar",
"$rootDir/dist/lib/ext/groovy.jar",
"$rootDir/dist/lib/ext/portlet-api.jar",
"$rootDir/dist/lib/ext/closure-compiler-unshaded.jar",
"$rootDir/dist/lib/ext/commons-io.jar",
"$rootDir/dist/lib/ext/commons-fileupload.jar",
"$rootDir/dist/lib/ext/zsoup.jar",
"$rootDir/dist/lib/ext/zkdiffer.jar",
"$rootDir/dist/lib/ext/spring-core-5.2.15.RELEASE.jar",
"$rootDir/dist/lib/ext/spring-beans-5.2.15.RELEASE.jar",
"$rootDir/dist/lib/ext/spring-context-5.2.15.RELEASE.jar",
"$rootDir/dist/lib/ext/spring-web-5.2.15.RELEASE.jar",
"$rootDir/dist/lib/ext/javax.inject-1.jar",
"$rootDir/dist/lib/ext/javaee-api.jar",
"$rootDir/dist/lib/ext/javassist.jar",
"$rootDir/dist/lib/ext/jfreechart.jar",
"$rootDir/dist/lib/ext/commons-el.jar",
"$rootDir/dist/lib/ext/jackson-databind.jar",
"$rootDir/dist/lib/ext/jasperreports.jar",
"$rootDir/dist/lib/ext/acegi-security.jar",
"$rootDir/dist/lib/ext/s2-framework.jar",
"$rootDir/dist/lib/ext/ognl.jar",
"$rootDir/dist/lib/ext/mvel.jar",
"$rootDir/dist/lib/ext/jcommon.jar",
"$rootDir/dist/lib/ext/jackson-core.jar",
"$rootDir/dist/lib/ext/Filters.jar",
"$rootDir/dist/lib/ext/jackson-annotations.jar",
"$rootDir/dist/lib/ext/value.jar",
"$rootDir/dist/lib/ext/value-processor.jar",
"$rootDir/dist/lib/ext/metainf.jar",
"$rootDir/dist/lib/ext/generator.jar",
"$rootDir/dist/lib/ext/reflections.jar",
"$rootDir/dist/lib/ext/junit-jupiter-api.jar"
)
// general javadoc options
def javadocOptions = {
options.author true
Expand Down Expand Up @@ -93,8 +51,26 @@ task alljavadoc(type: Javadoc) {
'**/*.jjt',
'**/**.template' //stateless action type template
destinationDir = file("$buildDir/docs/javadoc/zk")
classpath = javadocClassPath

subprojects.forEach(prj -> {
classpath += prj.sourceSets.main.compileClasspath
})
gradle.includedBuilds.each {
// println ">>>>>>>>$it.name"
if (it.name != 'zkthemes' && it.name != 'zksandbox') {
def rootGradle = it.properties['target'].properties['buildController'].gradle
it.properties['target'].properties['availableModules'].each {
def prj = rootGradle.rootProject.findProject(it.right.identityPath.toString())
if (!prj) {
prj = rootGradle.rootProject.findProject(it.right.projectPath.toString())
}
// println ">>> name: " + prj.name
if (prj) {
classpath += prj.configurations.compileClasspath
}
}
}
}
doLast {
addJavadocFooter("$buildDir/docs/javadoc/zk", footerMessage)

Expand Down Expand Up @@ -141,7 +117,7 @@ subprojects {
destinationDir = file("$buildDir/docs/javadoc")

// add jars in dist into classpath
classpath += javadocClassPath
classpath += configurations.compileClasspath
// add jars in other projects(zk & cml) into classpath
classpath += files(zkprojects.collect {prj, dir ->
"$dir/build/libs/$prj-${version}.jar"
Expand Down

0 comments on commit e92067c

Please sign in to comment.