3284a61f43
The latest Android `sdkmanager` tool requires a version of the jdk that no longer supports Java 7 as a target
26 lines
451 B
Bash
Executable File
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" .
|