Skip to content

Commit

Permalink
JavaDoc generation with Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
ckittl committed Jan 6, 2022
1 parent bf5a21f commit 9029ea5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Reduced code smells
- Protected constructors for abstract classes
- Use pattern matching
- Create JavaDoc with java 17 instead of java 8

### Added
- added `EvcsLocationType` support in `EvcsInput` and `EvcsInputFactory` [#406](https://github.com/ie3-institute/PowerSystemDataModel/issues/406)
Expand Down
11 changes: 4 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ node {
gradle('--refresh-dependencies clean spotlessCheck pmdMain pmdTest spotbugsMain ' +
'spotbugsTest test jacocoTestReport jacocoTestCoverageVerification', projectName)

// due to an issue with openjdk-8 we use openjdk-11 for javadocs generation
sh(script: """set +x && cd $projectName""" + ''' set +x; ./gradlew clean javadoc -Dorg.gradle.java.home=/opt/java/openjdk''', returnStdout: true)
sh(script: """set +x && cd $projectName""" + ''' set +x; ./gradlew clean javadoc''', returnStdout: true)
}

// sonarqube analysis
Expand Down Expand Up @@ -159,13 +158,11 @@ node {
]) {

/*
* There is a known bug in JavaDoc generation in JDK 8. Therefore generate the JavaDoc with JDK
* 11 first and do the rest of the tasks with JDK 8. IMPORTANT: Do not issue 'clean' in the
* following task
* IMPORTANT: Do not issue 'clean' in the following task
*/
sh(
script: """set +x && cd $projectName""" +
''' set +x; ./gradlew clean javadoc -Dorg.gradle.java.home=/opt/java/openjdk''',
''' set +x; ./gradlew clean javadoc''',
returnStdout: true
)

Expand Down Expand Up @@ -395,7 +392,7 @@ def deployJavaDocs(String projectName, String sshCredentialsId, String gitChecko
"git config user.name 'Johannes Hiry' && " +
"git fetch --depth=1 origin api-docs && " +
"git checkout api-docs && " +
"cd .. && ./gradlew clean javadoc -Dorg.gradle.java.home=/opt/java/openjdk && " +
"cd .. && ./gradlew clean javadoc && " +
"cp -R build/docs/javadoc/* tmp-api-docs && " +
"cd tmp-api-docs &&" +
"git add --all && git commit -m 'updated api-docs' && git push origin api-docs:api-docs" +
Expand Down

0 comments on commit 9029ea5

Please sign in to comment.