-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup-java17.sh
More file actions
executable file
·29 lines (25 loc) · 1009 Bytes
/
setup-java17.sh
File metadata and controls
executable file
·29 lines (25 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# This script sets up Java 17 for local development
# For JitPack builds, the jitpack.yml handles Java version
echo "Checking for Java 17..."
# Check if Java 17 is available
if /usr/libexec/java_home -v 17 &>/dev/null; then
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
echo "Found Java 17 at: $JAVA_HOME"
else
echo "Java 17 not found. Please install it using one of these methods:"
echo ""
echo "Option 1: Using Homebrew (recommended for macOS):"
echo " brew install openjdk@17"
echo " sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk"
echo ""
echo "Option 2: Download from Adoptium:"
echo " https://adoptium.net/temurin/releases/?version=17"
echo ""
echo "For JitPack builds, this is handled automatically by jitpack.yml"
exit 1
fi
# Run the build
echo "Running Gradle build with Java 17..."
./gradlew clean :ffmpegx:assembleRelease
./gradlew :ffmpegx:publishToMavenLocal