File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env groovy
2+
13String buildsToKeep = ' 500'
24
35String gradleArgs = ' -Dorg.gradle.daemon=false --stacktrace'
6+ boolean isPublish = BRANCH_NAME == ' publish'
47
58// Note: using single quotes to avoid Groovy String interpolation leaking secrets.
69def internalRepoArgsBat = ' -PinternalObjectBoxRepo=%MVN_REPO_URL% ' +
@@ -67,6 +70,18 @@ pipeline {
6770 }
6871 }
6972 }
73+
74+ stage(' package-javadoc-for-web' ) {
75+ when { expression { return isPublish } }
76+ steps {
77+ bat " gradlew $gradleArgs $internalRepoArgsBat :objectbox-java:packageJavadocForWeb"
78+ }
79+ post {
80+ always {
81+ archiveArtifacts artifacts : ' objectbox-java/build/dist/objectbox-java-web-api-docs.zip'
82+ }
83+ }
84+ }
7085 }
7186
7287 // For global vars see /jenkins/pipeline-syntax/globals
Original file line number Diff line number Diff line change @@ -38,11 +38,15 @@ javadoc {
3838}
3939
4040// Note: use packageJavadocForWeb to get as ZIP.
41- // Note: the style changes only work if using JDK 10+.
4241task javadocForWeb (type : Javadoc ) {
4342 group = ' documentation'
4443 description = ' Builds Javadoc incl. objectbox-java-api classes with web tweaks.'
4544
45+ javadocTool = javaToolchains. javadocToolFor {
46+ // Note: the style changes only work if using JDK 10+, 11 is latest LTS.
47+ languageVersion = JavaLanguageVersion . of(11 )
48+ }
49+
4650 def srcApi = project(' :objectbox-java-api' ). file(' src/main/java/' )
4751 if (! srcApi. directory) throw new GradleScriptException (" Not a directory: ${ srcApi} " , null )
4852 // Hide internal API from javadoc artifact.
You can’t perform that action at this time.
0 commit comments