1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

[travis] Only run javadocAll on Java 11 or higher

It appears that 'javadoc' from older JREs is not able to consume the
javadoc generated by newer JREs:

javadoc: warning - Error fetching URL: https://jxmpp.org/releases/0.7.0-alpha6/javadoc/
javadoc: warning - Error fetching URL: https://minidns.org/releases/0.4.0-alpha5/javadoc/
This commit is contained in:
Florian Schmaus 2020-05-25 11:14:47 +02:00
parent d65f2c932e
commit 70188dbe57

View file

@ -35,7 +35,16 @@ install: gradle assemble --stacktrace
# functional. Which hasn't always be the case in the past, see
# 90cbcaebc7a89f4f771f733a33ac9f389df85be2
# Also run javadocAll to ensure it works.
script: gradle check publishToMavenLocal javadocAll --stacktrace
script:
- |
JAVAC_MAJOR_VERSION=$(javac -version | sed -E 's/javac ([[:digit:]]+).*/\1/')
GRADLE_TASKS=()
GRADLE_TASKS+=(check)
GRADLE_TASKS+=(publishToMavenLocal)
if [[ ${JAVAC_MAJOR_VERSION} -ge 11 ]]; then
GRADLE_TASKS+=(javadocAll)
fi
gradle ${GRADLE_TASKS[@]} --stacktrace
after_success:
- JAVAC_VERSION=$((javac -version) 2>&1)