コード例 #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']
コード例 #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']
コード例 #3
0
def IsOsX():
    return defines.IsOsX()
コード例 #4
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'


def ParseOptions(argv):
    result = optparse.OptionParser()