diff options
Diffstat (limited to 'test/127-secondarydex/build')
-rwxr-xr-x | test/127-secondarydex/build | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/127-secondarydex/build b/test/127-secondarydex/build index 712774f..0d9f4d6 100755 --- a/test/127-secondarydex/build +++ b/test/127-secondarydex/build @@ -23,9 +23,21 @@ ${JAVAC} -d classes `find src -name '*.java'` mkdir classes-ex mv classes/Super.class classes-ex -if [ ${NEED_DEX} = "true" ]; then - ${DX} -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex --dump-width=1000 classes +if [ ${USE_JACK} = "true" ]; then + # Create .jack files from classes generated with javac. + ${JILL} classes --output classes.jack + ${JILL} classes-ex --output classes-ex.jack + + # Create DEX files from .jack files. + ${JACK} --import classes.jack --output-dex . zip $TEST_NAME.jar classes.dex - ${DX} -JXmx256m --debug --dex --dump-to=classes-ex.lst --output=classes.dex --dump-width=1000 classes-ex + ${JACK} --import classes-ex.jack --output-dex . zip ${TEST_NAME}-ex.jar classes.dex +else + if [ ${NEED_DEX} = "true" ]; then + ${DX} -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex --dump-width=1000 classes + zip $TEST_NAME.jar classes.dex + ${DX} -JXmx256m --debug --dex --dump-to=classes-ex.lst --output=classes.dex --dump-width=1000 classes-ex + zip ${TEST_NAME}-ex.jar classes.dex + fi fi |