Exemplo n.º 1
0
def GetJdk8Home():
  root = os.path.join(JDK_DIR, 'jdk8')
  if defines.IsLinux():
    return os.path.join(root, 'linux-x86')
  elif defines.IsOsX():
    return os.path.join(root, 'darwin-x86')
  else:
    return os.environ['JAVA_HOME']
Exemplo n.º 2
0
def GetJdkHome():
  root = os.path.join(JDK_DIR, 'openjdk-9.0.4')
  if defines.IsLinux():
    return os.path.join(root, 'linux')
  elif defines.IsOsX():
    return os.path.join(root, 'osx')
  elif defines.IsWindows():
    return os.path.join(root, 'windows')
  else:
    return os.environ['JAVA_HOME']
Exemplo n.º 3
0
def IsLinux():
    return defines.IsLinux()
Exemplo n.º 4
0
# http://storage.googleapis.com/r8-releases/raw can be treated as a maven
# repository to fetch the artifact com.android.tools:desugar_jdk_libs:1.0.0

import archive
import defines
import git_utils
import optparse
import os
import re
import shutil
import subprocess
import sys
import utils
import zipfile

if defines.IsLinux():
    JDK8_JAVAC = os.path.join(defines.THIRD_PARTY, 'openjdk', 'jdk8',
                              'linux-x86', 'bin', 'javac')
elif defines.IsOsX():
    JDK8_JAVAC = os.path.join(defines.THIRD_PARTY, 'openjdk', 'jdk8',
                              'darwin-x86', 'bin', 'javac')
elif defines.IsWindows():
    raise Exception(
        'Cannot compile using JDK8 on Windows hence cannot archive.')

CONVERSION_FOLDER = os.path.join(defines.REPO_ROOT, 'src', 'test',
                                 'desugaredLibraryConversions')

VERSION_FILE = 'VERSION.txt'
LIBRARY_NAME = 'desugar_jdk_libs'