1833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe#!/bin/bash 2833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# 3833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# Copyright (C) 2014 The Android Open Source Project 4833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# 5833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# Licensed under the Apache License, Version 2.0 (the "License"); 6833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# you may not use this file except in compliance with the License. 7833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# You may obtain a copy of the License at 8833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# 9833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# http://www.apache.org/licenses/LICENSE-2.0 10833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# 11833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# Unless required by applicable law or agreed to in writing, software 12833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# distributed under the License is distributed on an "AS IS" BASIS, 13833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# See the License for the specific language governing permissions and 15833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# limitations under the License. 16833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe 17833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# Stop if something fails. 18833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampeset -e 19833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe 20833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampemkdir classes 21833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe 22833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# All except Main 23833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe${JAVAC} -d classes `find src -name '*.java'` 24833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gamperm classes/Main.class 25833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe${DX} -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex classes 26833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe 27833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe# Only Main 28833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe${JAVAC} -d classes `find src -name '*.java'` 29833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gamperm classes/Second.class classes/FillerA.class classes/FillerB.class classes/Inf*.class 30833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe${DX} -JXmx256m --debug --dex --dump-to=classes2.lst --output=classes2.dex classes 31833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampe 32833a48501d560c9fa7fc78ef619888138c2d374fAndreas Gampezip $TEST_NAME.jar classes.dex classes2.dex 33