Skip to content

Commit d8e5fd7

Browse files
Jenkinsfile-Windows: build and archive javadoc for web.
1 parent 501227d commit d8e5fd7

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

ci/Jenkinsfile-Windows

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
#!/usr/bin/env groovy
2+
13
String buildsToKeep = '500'
24

35
String 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.
69
def 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

objectbox-java/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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+.
4241
task 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.

0 commit comments

Comments
 (0)