GeezerVison is showing github.com — Jenkinsfile-Windows: build and archive javadoc for web. · TinyAndNeo/objectbox-java@d8e5fd7
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: ci/Jenkinsfile-Windows +15Lines changed: 15 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +#!/usr/bin/env groovy |
| 2 | + |
1 | 3 | String buildsToKeep = '500' |
2 | 4 |
|
3 | 5 | String gradleArgs = '-Dorg.gradle.daemon=false --stacktrace' |
| 6 | +boolean isPublish = BRANCH_NAME == 'publish' |
4 | 7 |
|
5 | 8 | // Note: using single quotes to avoid Groovy String interpolation leaking secrets. |
6 | 9 | def internalRepoArgsBat = '-PinternalObjectBoxRepo=%MVN_REPO_URL% ' + |
@@ -67,6 +70,18 @@ pipeline { |
67 | 70 | } |
68 | 71 | } |
69 | 72 | } |
| 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 | + } |
70 | 85 | } |
71 | 86 |
|
72 | 87 | // For global vars see /jenkins/pipeline-syntax/globals |
|
Collapse file
Copy file name to clipboardExpand all lines: objectbox-java/build.gradle +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -38,11 +38,15 @@ javadoc { |
38 | 38 | } |
39 | 39 |
|
40 | 40 | // Note: use packageJavadocForWeb to get as ZIP. |
41 | | -// Note: the style changes only work if using JDK 10+. |
42 | 41 | task javadocForWeb(type: Javadoc) { |
43 | 42 | group = 'documentation' |
44 | 43 | description = 'Builds Javadoc incl. objectbox-java-api classes with web tweaks.' |
45 | 44 |
|
| 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 | + |
46 | 50 | def srcApi = project(':objectbox-java-api').file('src/main/java/') |
47 | 51 | if (!srcApi.directory) throw new GradleScriptException("Not a directory: ${srcApi}", null) |
48 | 52 | // Hide internal API from javadoc artifact. |
|