mpd/android/run-javac.sh
Colin Edwards 3284a61f43 android: build with java 8 target
The latest Android `sdkmanager` tool requires a version of the jdk that no longer
supports Java 7 as a target
2023-12-13 11:50:21 -06:00

26 lines
451 B
Bash
Executable File

#!/bin/sh -e
JAVAC=$1
CLASSPATH=$2
JAVA_PKG_PATH=$3
ZIP=$4
DIRNAME=`dirname "$5"`
REALDIR=`realpath "$DIRNAME"`
BASENAME=`basename "$5"`
JARFILE=$REALDIR/$BASENAME
shift 5
D=`dirname "$JARFILE"`
GENSRC="$D/src"
GENCLASS="$D/classes"
GENINCLUDE="$D/include"
mkdir -p "$GENSRC/$JAVA_PKG_PATH"
"$JAVAC" -source 1.8 -target 1.8 -Xlint:-options \
-cp "$CLASSPATH" \
-h "$GENINCLUDE" \
-d "$GENCLASS" \
"$@"
cd "$GENCLASS"
zip -q -r "$JARFILE" .