Пример #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
# 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
# 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
# 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
# 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")