-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for building jdk17 packages with jitpack
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |