示例#1
0
def build_groovy_java(groovy_dir,
                      java_dir,
                      bin_dir,
                      recursive=True,
                      *class_paths):
    if type(recursive) is not bool:
        raise ValueError("Recursive flag must be of type boolean")
    makedirs(bin_dir, exist_ok=True)
    cmd = ["groovyc"]
    class_path = __get_class_path__(class_paths)
    if class_path != "":
        cmd += ["-cp"] + [class_path]

    cmd += [
        "-j",
        "-Jd=" + bin_dir,
    ]
    if class_path != "":
        cmd += ["-Jcp=" + class_path]
    cmd = cmd + ["--temp"] + [bin_dir]
    to_compile = get_files(groovy_dir, recursive, '.groovy') + get_files(
        java_dir, recursive, '.java')
    cmd = cmd + to_compile
    print(cmd)
    subprocess.check_call(cmd)
示例#2
0
def build_groovy_java(groovy_dir, java_dir, bin_dir, recursive=True, *class_paths):
    if type(recursive) is not bool:
        raise ValueError("Recursive flag must be of type boolean")
    makedirs(bin_dir, exist_ok=True)
    cmd = ["groovyc"]
    class_path = __get_class_path__(class_paths)
    if class_path != "":
        cmd += ["-cp"] + [class_path]

    cmd += ["-j", "-Jd=" + bin_dir, ]
    if class_path != "":
        cmd += ["-Jcp=" + class_path]
    cmd = cmd + ["--temp"] + [bin_dir]
    to_compile = get_files(groovy_dir, recursive, '.groovy') + get_files(java_dir, recursive, '.java')
    cmd = cmd + to_compile
    print(cmd)
    subprocess.check_call(cmd)
示例#3
0
def build_classes(source_dir, bin_dir, recursive=True, *class_paths):
    if type(recursive) is not bool:
        raise ValueError("Recursive flag must be of type boolean")
    makedirs(bin_dir, exist_ok=True)
    args = ["javac", "-d", bin_dir]
    class_path = __get_class_path__(class_paths)
    if class_path != "":
        args = args + ["-cp"] + [class_path]
    to_compile = get_files(source_dir, recursive, '.java')
    args = args + to_compile
    subprocess.check_call(args)
示例#4
0
def build_classes(source_dir, bin_dir, recursive=True, *class_paths):
    if type(recursive) is not bool:
        raise ValueError("Recursive flag must be of type boolean")
    makedirs(bin_dir, exist_ok=True)
    args = ["javac", "-d", bin_dir]
    class_path = __get_class_path__(class_paths)
    if class_path != "":
        args = args + ["-cp"] + [class_path]
    to_compile = get_files(source_dir, recursive, '.java')
    args = args + to_compile
    subprocess.check_call(args)
示例#5
0
def build_groovy_classes(source_dir, bin_dir, recursive=True, *class_paths):
    if type(recursive) is not bool:
        raise ValueError("Recursive flag must be of type boolean")
    makedirs(bin_dir, exist_ok=True)
    cmd = ["groovyc"]
    class_path = __get_class_path__(class_paths)
    if class_path != "":
        cmd += ["-cp"] + [class_path]
    cmd = cmd + ["--temp"] + [bin_dir]
    to_compile = get_files(source_dir, recursive, '.groovy')
    cmd = cmd + to_compile
    subprocess.check_call(cmd)
示例#6
0
def build_groovy_classes(source_dir, bin_dir, recursive=True, *class_paths):
    if type(recursive) is not bool:
        raise ValueError("Recursive flag must be of type boolean")
    makedirs(bin_dir, exist_ok=True)
    cmd = ["groovyc"]
    class_path = __get_class_path__(class_paths)
    if class_path != "":
        cmd += ["-cp"] + [class_path]
    cmd = cmd + ["--temp"] + [bin_dir]
    to_compile = get_files(source_dir, recursive, '.groovy')
    cmd = cmd + to_compile
    subprocess.check_call(cmd)