Exemplo n.º 1
0
  def default_sources(cls, sources_rel_path):
    """Provide sources, if they weren't specified explicitly in the BUILD file.

    By default this globs over self.default_sources_globs (e.g., '*.java')
    but subclasses can override to provide more nuanced default behavior.
    In this case, the subclasses must also override supports_default_sources().
    """
    if cls.default_sources_globs is not None:
      if cls.default_sources_exclude_globs is not None:
        exclude = [Globs.create_fileset_with_spec(sources_rel_path,
                                                  *maybe_list(cls.default_sources_exclude_globs))]
      else:
        exclude = []
      return Globs.create_fileset_with_spec(sources_rel_path,
                                            *maybe_list(cls.default_sources_globs),
                                            exclude=exclude)
    return None
Exemplo n.º 2
0
 def sources(self, rel_path, *args):
   return Globs.create_fileset_with_spec(rel_path, *args)
Exemplo n.º 3
0
 def sources(rel_path, *globs):
   return Globs.create_fileset_with_spec(rel_path, *globs)
Exemplo n.º 4
0
 def sources(rel_path, *args):
     return Globs.create_fileset_with_spec(rel_path, *args)
Exemplo n.º 5
0
def _globs(rel_path):
    pc = ParseContext(rel_path=rel_path, type_aliases={})
    return Globs(pc)