Skip to content

Commit 5ffdcdd

Browse files
committed
Update java version
1 parent 6ba1b40 commit 5ffdcdd

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.travis.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
language: ruby
22
before_install:
3-
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
4-
- source ./install-jdk.sh -F 11 -L GPL -W $HOME/jdk
3+
- LOCAL_DIR=${HOME}/.cache/openjdk
4+
- TARGET_DIR=${HOME}/openjdk11
5+
- mkdir -p ${LOCAL_DIR}
6+
- DOWNLOAD_URL="https://pmd-code.org/openjdk/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz"
7+
- OPENJDK_ARCHIVE=$(basename $DOWNLOAD_URL)
8+
- if [ ! -e ${LOCAL_DIR}/${OPENJDK_ARCHIVE} ]; then wget --directory-prefix ${LOCAL_DIR} --timestamping --continue ${DOWNLOAD_URL}; fi
9+
- tar --extract --file ${LOCAL_DIR}/${OPENJDK_ARCHIVE} -C ${TARGET_DIR} --strip-components=1
10+
- export JAVA_HOME="${TARGET_DIR}"
11+
- export PATH="${TARGET_DIR}/bin:${PATH}"
12+
- java -version
513
script:
614
- rake check_manifest
715
- rake rubocop
@@ -27,5 +35,5 @@ deploy:
2735
cache:
2836
directories:
2937
- vendor/bundle
30-
- "$HOME/jdk"
3138
- "$HOME/.rvm/"
39+
- "$HOME/.cache/openjdk"

0 commit comments

Comments
 (0)