Fix: Java 21 for Piped, auto set JDK path
This commit is contained in:
parent
abcd780bd1
commit
fa28aada0b
2 changed files with 13 additions and 1 deletions
|
@ -8,7 +8,9 @@ Patches may outdate, so open an issue
|
||||||
if you get an error while script applies them.
|
if you get an error while script applies them.
|
||||||
|
|
||||||
## How to build
|
## How to build
|
||||||
1. Install dependencies: `doas apk add git openjdk17 7zip`
|
1. Install dependencies: `doas apk add git openjdk17 openjdk21 7zip`
|
||||||
|
(Note that both OpenJDK 17 and 21 are installed,
|
||||||
|
for building reqwest4j and Piped respectively)
|
||||||
2. Install Rust: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
|
2. Install Rust: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
|
||||||
(Note that you don't need doas or sudo here)
|
(Note that you don't need doas or sudo here)
|
||||||
3. Enter to RustUp environment: `source ~/.cargo/env`
|
3. Enter to RustUp environment: `source ~/.cargo/env`
|
||||||
|
|
10
build.sh
10
build.sh
|
@ -68,8 +68,13 @@ cd_and_exec reqwest4j/reqwest-jni \
|
||||||
cargo build --release --target x86_64-unknown-linux-musl
|
cargo build --release --target x86_64-unknown-linux-musl
|
||||||
|
|
||||||
title 'Building reqwest4j without Rust library...'
|
title 'Building reqwest4j without Rust library...'
|
||||||
|
OLD_PATH="$PATH"
|
||||||
|
export JAVA_HOME="/usr/lib/jvm/java-17-openjdk"
|
||||||
|
export PATH="$JAVA_HOME/bin:$PATH"
|
||||||
cd_and_exec reqwest4j ./gradlew shadowJar
|
cd_and_exec reqwest4j ./gradlew shadowJar
|
||||||
cd_and_exec reqwest4j ./gradlew --stop
|
cd_and_exec reqwest4j ./gradlew --stop
|
||||||
|
export PATH="$OLD_PATH"
|
||||||
|
unset JAVA_HOME
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
|
@ -120,8 +125,13 @@ title 'Creating VERSION file...'
|
||||||
cd_and_exec backend set_piped_version
|
cd_and_exec backend set_piped_version
|
||||||
|
|
||||||
title 'Building Piped...'
|
title 'Building Piped...'
|
||||||
|
OLD_PATH="$PATH"
|
||||||
|
export JAVA_HOME="/usr/lib/jvm/java-21-openjdk"
|
||||||
|
export PATH="$JAVA_HOME/bin:$PATH"
|
||||||
cd_and_exec backend ./gradlew shadowJar
|
cd_and_exec backend ./gradlew shadowJar
|
||||||
cd_and_exec backend ./gradlew --stop
|
cd_and_exec backend ./gradlew --stop
|
||||||
|
export PATH="$OLD_PATH"
|
||||||
|
unset JAVA_HOME
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
|
|
Loading…
Reference in a new issue