示例#1
0
def prepare_wrapper(dist, temp):
    wrapper_file = os.path.join(
        utils.REPO_ROOT,
        'src/main/java/com/android/tools/r8/utils/CompileDumpCompatR8.java')
    subprocess.check_output([
        jdk.GetJavacExecutable(),
        wrapper_file,
        '-d',
        temp,
        '-cp',
        dist,
    ])
    return temp
示例#2
0
def run(args):
    cmd = [jdk.GetJavacExecutable()] + args
    utils.PrintCmd(cmd)
    result = subprocess.check_output(cmd)
    print result
    return result
示例#3
0
import fnmatch
import glob
import jdk
import optparse
import os
import shutil
import subprocess
import sys
import time
import utils
import uuid

DEFAULT_AAPT = 'aapt'  # Assume in path.
DEFAULT_D8 = os.path.join(utils.REPO_ROOT, 'tools', 'd8.py')
DEFAULT_DEXSPLITTER = os.path.join(utils.REPO_ROOT, 'tools', 'dexsplitter.py')
DEFAULT_JAVAC = jdk.GetJavacExecutable()
SRC_LOCATION = 'src/com/android/tools/r8/sample/{app}/*.java'
DEFAULT_KEYSTORE = os.path.join(os.getenv('HOME'), '.android',
                                'debug.keystore')
PACKAGE_PREFIX = 'com.android.tools.r8.sample'
STANDARD_ACTIVITY = "R8Activity"
BENCHMARK_ITERATIONS = 30

SAMPLE_APKS = ['simple', 'split']


def parse_options():
    result = optparse.OptionParser()
    result.add_option('--aapt',
                      help='aapt executable to use',
                      default=DEFAULT_AAPT)