mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-05 18:49:30 +00:00
adding retrolamba based on script supplied by gungwald #29
This commit is contained in:
parent
9e7019e245
commit
c6bb6c68f6
16
tools/check-java-versions.sh
Executable file
16
tools/check-java-versions.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
TMP=$(mktemp --directory)
|
||||
|
||||
pushd build
|
||||
for JAR in $(find . -name "*.jar" -a -not -name "*-sources.jar" -a -not -name "*-javadoc.jar")
|
||||
do
|
||||
echo "Checking ${JAR}..."
|
||||
unzip -qq -d ${TMP} ${JAR}
|
||||
find ${TMP} -name "*.class" | xargs file -b | sort -u
|
||||
rm -rf ${TMP}/*
|
||||
echo
|
||||
done
|
||||
popd
|
||||
|
||||
rm -rf ${TMP}
|
BIN
tools/retrolambda-2.5.6.jar
Normal file
BIN
tools/retrolambda-2.5.6.jar
Normal file
Binary file not shown.
40
tools/retrolambda.sh
Executable file
40
tools/retrolambda.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
echo Provide on jar file to convert on the command line.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REALPATH=$(realpath $0)
|
||||
BIN_DIR=`dirname "$REALPATH"`
|
||||
LIB_DIR=$BIN_DIR
|
||||
|
||||
JAR_TO_CONVERT="$1"
|
||||
INPUT_DIR="$JAR_TO_CONVERT".inputdir
|
||||
OUTPUT_DIR="$JAR_TO_CONVERT".outputdir
|
||||
|
||||
rm -rf "$INPUT_DIR"
|
||||
rm -rf "$OUTPUT_DIR"
|
||||
mkdir "$INPUT_DIR"
|
||||
mkdir "$OUTPUT_DIR"
|
||||
(cd "$INPUT_DIR"; jar -xvf $OLDPWD/"$JAR_TO_CONVERT")
|
||||
|
||||
java \
|
||||
-Dretrolambda.bytecodeVersion=49 \
|
||||
-Dretrolambda.defaultMethods=true \
|
||||
-Dretrolambda.inputDir="$INPUT_DIR" \
|
||||
-Dretrolambda.outputDir="$OUTPUT_DIR" \
|
||||
-Dretrolambda.classpath="$JAR_TO_CONVERT" \
|
||||
-Dretrolambda.javacHacks=true \
|
||||
-Dretrolambda.quiet=false \
|
||||
-jar "$LIB_DIR"/retrolambda-2.5.6.jar
|
||||
|
||||
# The order of the "m" and "f" must match the order that the
|
||||
# corresponding files appear in the argument list. This is
|
||||
# so stupid...
|
||||
jar -cvfm "$JAR_TO_CONVERT".java5.jar \
|
||||
"$OUTPUT_DIR"/META-INF/MANIFEST.MF \
|
||||
-C "$OUTPUT_DIR" .
|
Loading…
Reference in New Issue
Block a user