Ejemplo n.º 1
0
def _find_protobuf_path(toolkit_path):
    """Fetch and locate protobuf source"""
    global _protobuf_path
    if not _protobuf_path:
        logger.debug('Searching for latest protobuf source')
        _protobuf_path = task_utils.get_java_tool_path(toolkit_path, 'protobufJavaDir')
    return _protobuf_path
Ejemplo n.º 2
0
def _find_protobuf_path(toolkit_path):
    """Fetch and locate protobuf source"""
    global _protobuf_path
    if not _protobuf_path:
        logger.debug('Searching for latest protobuf source')
        _protobuf_path = task_utils.get_java_tool_path(toolkit_path, 'protobufJavaDir')
    return _protobuf_path
Ejemplo n.º 3
0
 def execute(self, gapic_code_dir, toolkit_path):
     logger.debug('Formatting files in %s.' %
                 os.path.abspath(gapic_code_dir))
     path = task_utils.get_java_tool_path(toolkit_path, 'googleJavaFormatJar')
     targetFiles = []
     for root, dirs, files in os.walk(gapic_code_dir):
         for filename in files:
             if filename.endswith('.java'):
                 targetFile = os.path.abspath(os.path.join(root, filename))
                 targetFiles.append(targetFile)
     self.exec_command(
             ['java', '-jar', path, '--replace'] + targetFiles)
Ejemplo n.º 4
0
 def grpc_plugin_path(self, toolkit_path):
     return task_utils.get_java_tool_path(toolkit_path, 'protoGenGrpcJavaExe')
Ejemplo n.º 5
0
 def grpc_plugin_path(self, toolkit_path):
     return task_utils.get_java_tool_path(toolkit_path,
                                          'protoGenGrpcJavaExe')