Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refine javadoc build script #3043

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading