Skip to content

Commit

Permalink
Modified jitpack.yml for Java 16
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubleNico authored and BuildTools committed Jun 29, 2023
1 parent ade3df0 commit 7ad3c66
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
20 changes: 20 additions & 0 deletions ensure-java-16
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

JV=`java -version 2>&1 >/dev/null | head -1`
echo $JV | sed -E 's/^.*version "([^".]*)\.[^"]*".*$/\1/'

if [ "$JV" != 16 ]; then
case "$1" in
install)
echo "Installing SDKMAN..."
curl -s "https://get.sdkman.io" | bash
source ~/.sdkman/bin/sdkman-init.sh
sdk version
sdk install java 16.0.2-open
;;
use)
echo "must source ~/.sdkman/bin/sdkman-init.sh"
exit 1
;;
esac
fi
11 changes: 9 additions & 2 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
jdk:
- openjdk16
before_install:
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
- source ./install-jdk.sh --feature 16 --license GPL
- echo "Before Install"
- bash ensure-java-16 install
install:
- echo "Install"
- if ! bash ensure-java-16 use; then source ~/.sdkman/bin/sdkman-init.sh; fi
- java -version
- mvn install

0 comments on commit 7ad3c66

Please sign in to comment.