コード例 #1
0
def _find_protobuf_path(toolkit_path):
    """Fetch and locate protobuf source"""
    global _protobuf_path
    if not _protobuf_path:
        logger.info('Searching for latest protobuf source')
        _protobuf_path = task_utils.get_gradle_task_output(
            'showProtobufPath', toolkit_path)
    return _protobuf_path
コード例 #2
0
ファイル: protoc_utils.py プロジェクト: Landrito/artman
def _find_protobuf_path(toolkit_path):
    """Fetch and locate protobuf source"""
    global _protobuf_path
    if not _protobuf_path:
        logger.info('Searching for latest protobuf source')
        _protobuf_path = task_utils.get_gradle_task_output(
            'showProtobufPath', toolkit_path)
    return _protobuf_path
コード例 #3
0
 def execute(self, gapic_code_dir, toolkit_path):
     logger.info('Formatting files in %s.' %
                 os.path.abspath(gapic_code_dir))
     # TODO(shinfan): Move gradle task into requirement
     path = task_utils.get_gradle_task_output('showJavaFormatterPath',
                                              toolkit_path)
     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)
コード例 #4
0
ファイル: format_tasks.py プロジェクト: chrisdunelm/artman
 def execute(self, gapic_code_dir, toolkit_path):
     logger.info('Formatting files in %s.' %
                 os.path.abspath(gapic_code_dir))
     # TODO(shinfan): Move gradle task into requirement
     path = task_utils.get_gradle_task_output(
             'showJavaFormatterPath', toolkit_path)
     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)
コード例 #5
0
 def grpc_plugin_path(self, toolkit_path):
     if self.path is None:
         logger.info('start gradle process to locate GRPC Java plugin')
         self.path = task_utils.get_gradle_task_output(
             'showGrpcJavaPluginPath', toolkit_path)
     return self.path
コード例 #6
0
ファイル: protoc_utils.py プロジェクト: Landrito/artman
 def grpc_plugin_path(self, toolkit_path):
     if self.path is None:
         logger.info('start gradle process to locate GRPC Java plugin')
         self.path = task_utils.get_gradle_task_output(
             'showGrpcJavaPluginPath', toolkit_path)
     return self.path