示例#1
0
# recognize flags to narrow the gen set
goal(name='thrift', action=ThriftGen).install('gen').with_description('Generate code.')
goal(name='protoc', action=ProtobufGen).install('gen')


goal(
  name='checkstyle',
  action=Checkstyle,
  dependencies=['gen', 'resolve']
).install().with_description('Run checkstyle against java source code.')


# Support straight up checkstyle runs in addition to checkstyle as last phase of compile below
goal(name='javac',
     action=JavaCompile,
     group=group('gen', lambda target: is_codegen(target)),
     dependencies=['gen', 'resolve']).install('checkstyle')


def is_java(target):
 return isinstance(target, JavaLibrary) or \
        isinstance(target, JavaTests)

goal(name='scalac',
     action=ScalaCompile,
     group=group('jvm', is_scala),
     dependencies=['gen', 'resolve']).install('compile').with_description(
       'Compile both generated and checked in code.'
     )
goal(name='apt',
     action=JavaCompile,
示例#2
0
文件: goal.py 项目: soheilhy/commons
# recognize flags to narrow the gen set
goal(name='thrift', action=ThriftGen).install('gen').with_description('Generate code.')
goal(name='protoc', action=ProtobufGen).install('gen')


goal(
  name='checkstyle',
  action=Checkstyle,
  dependencies=['gen', 'resolve']
).install().with_description('Run checkstyle against java source code.')


# Support straight up checkstyle runs in addition to checkstyle as last phase of compile below
goal(name='javac',
     action=JavaCompile,
     group=group('gen', lambda target: target.is_codegen),
     dependencies=['gen', 'resolve']).install('checkstyle')


def is_java(target):
 return isinstance(target, JavaLibrary) or \
        isinstance(target, JavaTests)

goal(name='scalac',
     action=ScalaCompile,
     group=group('jvm', is_scala),
     dependencies=['gen', 'resolve']).install('compile').with_description(
       'Compile both generated and checked in code.'
     )
goal(name='apt',
     action=JavaCompile,
示例#3
0
).install().with_description('Run checkstyle against java source code.')

def is_java(target):
  return (isinstance(target, JavaLibrary)
          or (isinstance(target, (JvmBinary, junit_tests, Benchmark))
              and has_sources(target, '.java')))

def is_scala(target):
  return (isinstance(target, (ScalaLibrary, ScalaTests, ScalacPlugin))
          or (isinstance(target, (JvmBinary, junit_tests, Benchmark))
              and has_sources(target, '.scala')))


goal(name='scala',
     action=ScalaCompile,
     group=group('jvm', is_scala),
     dependencies=['gen', 'resolve', 'check-exclusives']).install('compile').with_description(
       'Compile both generated and checked in code.'
     )
goal(name='apt',
     action=JavaCompile,
     group=group('jvm', is_apt),
     dependencies=['gen', 'resolve', 'check-exclusives']).install('compile')
goal(name='java',
     action=JavaCompile,
     group=group('jvm', is_java),
     dependencies=['gen', 'resolve', 'check-exclusives']).install('compile')

goal(name='prepare', action=PrepareResources).install('resources')

# TODO(John Sirois): pydoc also
示例#4
0
文件: goal.py 项目: wangnana/commons
# task types to declare formally the targets they act on.
def _is_java(target):
    return (is_java(target) or (isinstance(target,
                                           (JvmBinary, junit_tests, Benchmark))
                                and _has_sources(target, '.java')))


def _is_scala(target):
    return (is_scala(target)
            or (isinstance(target, (JvmBinary, junit_tests, Benchmark))
                and _has_sources(target, '.scala')))


goal(name='scala',
     action=ScalaCompile,
     group=group('jvm', _is_scala),
     dependencies=['gen', 'resolve',
                   'check-exclusives']).install('compile').with_description(
                       'Compile both generated and checked in code.')
goal(name='apt',
     action=JavaCompile,
     group=group('jvm', is_apt),
     dependencies=['gen', 'resolve', 'check-exclusives']).install('compile')
goal(name='java',
     action=JavaCompile,
     group=group('jvm', _is_java),
     dependencies=['gen', 'resolve', 'check-exclusives']).install('compile')

goal(name='prepare', action=PrepareResources).install('resources')

# TODO(John Sirois): pydoc also
示例#5
0
文件: goal.py 项目: ugodiggi/commons
# recognize flags to narrow the gen set
goal(name='thrift', action=ThriftGen).install('gen').with_description('Generate code.')
goal(name='protoc', action=ProtobufGen).install('gen')


goal(
  name='checkstyle',
  action=Checkstyle,
  dependencies=['gen', 'resolve']
).install().with_description('Run checkstyle against java source code.')


# Support straight up checkstyle runs in addition to checkstyle as last phase of compile below
goal(name='javac',
     action=JavaCompile,
     group=group('gen', lambda target: is_codegen(target)),
     dependencies=['gen', 'resolve']).install('checkstyle')


def is_java(target):
 return isinstance(target, JavaLibrary) or \
        isinstance(target, JavaTests)

goal(name='scalac',
     action=ScalaCompile,
     group=group('jvm', is_scala),
     dependencies=['gen', 'resolve']).install('compile').with_description(
       'Compile both generated and checked in code.'
     )
goal(name='apt',
     action=JavaCompile,
示例#6
0
         'Resolves jar dependencies and produces dependency reports.')

# TODO(John Sirois): gen attempted as the sole Goal should gen for all known gen types but
# recognize flags to narrow the gen set
goal(name='thrift',
     action=ThriftGen).install('gen').with_description('Generate code.')
goal(name='protoc', action=ProtobufGen).install('gen')

goal(name='checkstyle', action=Checkstyle, dependencies=[
    'gen', 'resolve'
]).install().with_description('Run checkstyle against java source code.')

# Support straight up checkstyle runs in addition to checkstyle as last phase of compile below
goal(name='javac',
     action=JavaCompile,
     group=group('gen', lambda target: target.is_codegen),
     dependencies=['gen', 'resolve']).install('checkstyle')


def is_java(target):
    return isinstance(target, JavaLibrary) or \
           isinstance(target, JavaTests)


goal(name='scalac',
     action=ScalaCompile,
     group=group('jvm', is_scala),
     dependencies=['gen', 'resolve']).install('compile').with_description(
         'Compile both generated and checked in code.')
goal(name='apt',
     action=JavaCompile,
示例#7
0
文件: goal.py 项目: nsanch/commons
# TODO(John Sirois): gen attempted as the sole Goal should gen for all known gen types but
# recognize flags to narrow the gen set
goal(name="thrift", action=ThriftGen).install("gen").with_description("Generate code.")
goal(name="protoc", action=ProtobufGen).install("gen")


goal(name="checkstyle", action=Checkstyle, dependencies=["gen", "resolve"]).install().with_description(
    "Run checkstyle against java source code."
)


# Support straight up checkstyle runs in addition to checkstyle as last phase of compile below
goal(
    name="javac",
    action=JavaCompile,
    group=group("gen", lambda target: is_codegen(target)),
    dependencies=["gen", "resolve"],
).install("checkstyle")


def is_java(target):
    return isinstance(target, JavaLibrary) or isinstance(target, JavaTests)


goal(name="scalac", action=ScalaCompile, group=group("jvm", is_scala), dependencies=["gen", "resolve"]).install(
    "compile"
).with_description("Compile both generated and checked in code.")
goal(name="apt", action=JavaCompile, group=group("jvm", is_apt), dependencies=["gen", "resolve"]).install("compile")
goal(name="javac", action=JavaCompile, group=group("jvm", is_java), dependencies=["gen", "resolve"]).install("compile")