jitpack: Publish API with Java 17

This commit is contained in:
William committed 2023-04-17 21:56:16 +01:00
1 parent e898a8477e
commit 4b8a0f5719
2 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -3,13 +3,13 @@
JV=$(java -version 2>&1 >/dev/null | head -1) JV=$(java -version 2>&1 >/dev/null | head -1)
echo "$JV" | sed -E 's/^.*version "([^".]*)\.[^"]*".*$/\1/' echo "$JV" | sed -E 's/^.*version "([^".]*)\.[^"]*".*$/\1/'
if [ "$JV" != 16 ]; then if [ "$JV" != 17 ]; then
case "$1" in case "$1" in
install) install)
echo "installing sdkman..." echo "installing sdkman..."
curl -s "https://get.sdkman.io" | bash curl -s "https://get.sdkman.io" | bash
source ~/.sdkman/bin/sdkman-init.sh source ~/.sdkman/bin/sdkman-init.sh
sdk install java 16.0.1-open sdk install java 17.0.2-open
;; ;;
use) use)
echo "must source ~/.sdkman/bin/sdkman-init.sh" echo "must source ~/.sdkman/bin/sdkman-init.sh"
+5 -5
View File
@@ -1,12 +1,12 @@
# This file ensures jitpack builds HuskHomes correctly by setting the JDK to 16 # This file ensures jitpack builds HuskHomes correctly by setting the JDK to 17
jdk: jdk:
- 'openjdk16' - 'openjdk17'
before_install: before_install:
- 'git clone https://github.com/WiIIiam278/HuskHomes2.git --recurse-submodules' - 'git clone https://github.com/WiIIiam278/HuskHomes2.git --recurse-submodules'
- 'chmod +x gradlew' - 'chmod +x gradlew'
- 'chmod +x ./.scripts/ensure-java-16' - 'chmod +x ./.scripts/ensure-java-17'
- 'bash ./.scripts/ensure-java-16 install' - 'bash ./.scripts/ensure-java-17 install'
install: install:
- 'if ! ./.scripts/ensure-java-16 use; then source ~/.sdkman/bin/sdkman-init.sh; fi' - 'if ! ./.scripts/ensure-java-17 use; then source ~/.sdkman/bin/sdkman-init.sh; fi'
- 'java -version' - 'java -version'
- './gradlew publishToMavenLocal' - './gradlew publishToMavenLocal'