Skip to content

Commit

Permalink
feat: add support for building jdk17 packages with jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Silthus committed Nov 11, 2021
1 parent 9e0aadc commit b9eec76
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ensure-java-17
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" != 17 ]; 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 17.0.1-open
;;
use)
echo "must source ~/.sdkman/bin/sdkman-init.sh"
exit 1
;;
esac
fi
11 changes: 11 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
jdk:
- openjdk17
before_install:
- echo "Before Install"
- bash ensure-java-17 install
install:
- echo "Install"
- if ! bash ensure-java-17 use; then source ~/.sdkman/bin/sdkman-init.sh; fi
- java -version
- chmod +x ./gradlew
- ./gradlew publishToMavenLocal

0 comments on commit b9eec76

Please sign in to comment.