Ejemplo n.º 1
0
 def execute(self, intermediate_code_dir, toolkit_path):
     print 'Formatting files in ' + os.path.abspath(intermediate_code_dir)
     # TODO(shinfan): Move gradle task into requirement
     path = task_utils.runGradleTask('showJavaFormatterPath', toolkit_path)
     targetFiles = []
     for root, dirs, files in os.walk(intermediate_code_dir):
         for filename in files:
             if filename.endswith('.java'):
                 targetFile = os.path.abspath(os.path.join(root, filename))
                 targetFiles.append(targetFile)
     subprocess.check_call(['java', '-jar', path, '--replace'] +
                           targetFiles)
Ejemplo n.º 2
0
 def execute(self, intermediate_code_dir, gapi_tools_path):
     print 'Formatting files in ' + os.path.abspath(intermediate_code_dir)
     # TODO(shinfan): Move gradle task into requirement
     path = task_utils.runGradleTask(
             'showJavaFormatterPath', gapi_tools_path)
     targetFiles = []
     for root, dirs, files in os.walk(intermediate_code_dir):
         for filename in files:
             if filename.endswith('.java'):
                 targetFile = os.path.abspath(os.path.join(root, filename))
                 targetFiles.append(targetFile)
     subprocess.check_call(
         ['java', '-jar', path, '--replace'] + targetFiles)
Ejemplo n.º 3
0
 def grpc_plugin_path(self, toolkit_path):
     if self.path is None:
         print 'start gradle process to locate GRPC Java plugin'
         self.path = task_utils.runGradleTask(
             'showGrpcJavaPluginPath', toolkit_path)
     return self.path
Ejemplo n.º 4
0
def _find_protobuf_path(toolkit_path):
    """Fetch and locate protobuf source"""
    print 'Searching for latest protobuf source'
    return task_utils.runGradleTask(
        'showProtobufPath', toolkit_path)