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)
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)
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)
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)