Ejemplo n.º 1
0
def register_goals():
  task(name='changed', action=WhatChanged
  ).install().with_description('Print the targets changed since some prior commit.')

  # We always want compile to finish with a checkstyle
  task(name='checkstyle', action=Checkstyle,
       dependencies=['gen', 'resolve']).install('compile')
Ejemplo n.º 2
0
def register_goals():
  task(name='idea-plugin', action=IdeaPluginGen).install()
  task(name='export', action=Export).install()

  task(name='depmap', action=Depmap).install()
  task(name='dependencies', action=Dependencies).install()
  task(name='filedeps', action=FileDeps).install('filedeps')
Ejemplo n.º 3
0
def register_goals():
  NodeResolve.register_resolver_for_type(ScalaJSBinary, ScalaJSPlatform)
  # NB: These task/goal assignments are pretty nuts, but are necessary in order to
  # prevent product-graph cycles between the JVM and node.js.
  #   see https://github.com/pantsbuild/pants/labels/engine
  task(name='scala-js-compile', action=ScalaJSZincCompile).install('resolve')
  task(name='scala-js-link', action=ScalaJSLink).install('resolve')
Ejemplo n.º 4
0
def register_goals():
  task(
    name='map-derived-targets',
    action=MapDerivedTargets,
  ).install()

  task(
    name='map-sources-to-addresses-mapper',
    action=MapSourcesToAddresses,
  ).install()

  task(
    name='buildgen',
    action=Buildgen,
  ).install()

  # This is a noop from a task perspective - it only updates the target roots to properly attach
  # transitive dependencies.
  task(
    name='add-target-bags',
    action=BuildgenInjectTargetBags,
  ).install('test')

  task(
    name='aggregate-targets',
    action=BuildgenAggregateTargets,
  ).install('buildgen')
Ejemplo n.º 5
0
def register_goals():
  task(name='python-binary-create', action=PythonBinaryCreate).install('binary')
  task(name='pytest', action=PytestRun).install('test')
  task(name='py', action=PythonRun).install('run')
  task(name='py', action=PythonRepl).install('repl')
  task(name='setup-py', action=SetupPy).install().with_description(
    'Build setup.py-based Python projects from python_library targets.')
Ejemplo n.º 6
0
def register_goals():
  # TODO(#5962): register these under the 'compile' goal when we eliminate the product transitive
  # dependency from export -> compile.
  task(name='conan-prep', action=ConanPrep).install('native-compile')
  task(name='conan-fetch', action=ConanFetch).install('native-compile')
  task(name='c-for-ctypes', action=CCompile).install('native-compile')
  task(name='cpp-for-ctypes', action=CppCompile).install('native-compile')
  task(name='shared-libraries', action=LinkSharedLibraries).install('link')
Ejemplo n.º 7
0
def register_goals():
    task(name="python-binary-create", action=PythonBinaryCreate).install("binary")
    task(name="pytest", action=PytestRun).install("test")
    task(name="py", action=PythonRun).install("run")
    task(name="py", action=PythonRepl).install("repl")
    task(name="setup-py", action=SetupPy).install().with_description(
        "Build setup.py-based Python projects from python_library targets."
    )
Ejemplo n.º 8
0
def register_goals():
  task(name='checkstyle', action=Checkstyle,
       dependencies=['gen', 'resolve']
  ).install('compile')

  task(name='scalastyle', action=Scalastyle,
       dependencies=['bootstrap']
  ).install('compile')
Ejemplo n.º 9
0
def register_goals():
    Goal.register(
        "invalidate-fingerprint-dependees",
        "Hack to make sure that java libraries are recompiled when a resource is changed.",
    )
    task(name="invalidate-fingerprint-dependees", action=InvalidateFingerpintDependees).install(
        "invalidate-fingerprint-dependees"
    )
Ejemplo n.º 10
0
def register_goals():

  task(
    name='map-python-exported-symbols',
    action=MapPythonExportedSymbols,
  ).install()

  task(
    name='python',
    action=BuildgenPython,
  ).install('buildgen')
Ejemplo n.º 11
0
def register_goals():
  # FIXME(#5962): register these under the 'compile' goal when we eliminate the product transitive
  # dependency from export -> compile.
  task(name='native-third-party-fetch', action=NativeExternalLibraryFetch).install('native-compile')
  task(name='c-for-ctypes', action=CCompile).install('native-compile')
  task(name='cpp-for-ctypes', action=CppCompile).install('native-compile')
  task(name='shared-libraries', action=LinkSharedLibraries).install('link')
Ejemplo n.º 12
0
def register_goals():
  task(name='aapt', action=AaptGen).install('gen')

  task(name='dex', action=DxCompile,
       dependencies=['compile']).install('dex')

  task(name='apk', action=AaptBuilder,
       dependencies=['dex']).install('bundle')

  task(name='sign', action=JarsignerTask,
       dependencies=['bundle']).install('sign')
Ejemplo n.º 13
0
def register_goals():
  task(name='python-binary-create', action=PythonBinaryCreate, dependencies=['bootstrap', 'check-exclusives', 'resources']
  ).install('binary')

  task(name='pytest', action=PytestRun, dependencies=['bootstrap', 'check-exclusives', 'resources']
  ).install('test')

  task(name='python-run', action=PythonRun, dependencies=['bootstrap', 'check-exclusives', 'resources']
  ).install('run')

  task(name='python-repl', action=PythonRepl, dependencies=['bootstrap', 'check-exclusives', 'resources']
  ).install('repl')
Ejemplo n.º 14
0
def register_goals():
  # Spindle has a circular dependency, in that Spindle is required to build Spindle :(
  # The build_spindle task bootstraps a Spindle binary in order to allow sane iteration on the Spindle source code.
  task(name='build-spindle', action=BuildSpindle).install()
  task(name='spindle', action=SpindleGen).install('gen')

  Goal.register('ide-gen', 'Generate stub interfaces for IDE integration.')
  task(name='spindle-stubs', action=SpindleStubsGen).install('ide-gen')
Ejemplo n.º 15
0
def register_goals():
  task(name='tag', action=Tagger).install()
  task(name='validate', action=Validate).install()

  class ForceValidation(Task):
    @classmethod
    def prepare(cls, options, round_manager):
      round_manager.require_data('validated_build_graph')

    def execute(self):
      pass

  task(name='validate-graph', action=ForceValidation).install('gen')
Ejemplo n.º 16
0
def register_goals():
  Goal.by_name('idea').uninstall_task('idea')
  Goal.register('old-idea',
    'The old, deprecated task to generate an IntelliJ project (this is the task used in '
    'open-source pants).')
  Goal.register('idea', 
    'Generates an IntelliJ project for the specified targets and transitive dependencies. This is '
    'Square\'s internal version of the idea goal, implemented as a plugin.')
  Goal.register('new-idea', 'This has been renamed to just "idea".')

  task(name='old-idea', action=IdeaGen).install('old-idea')
  task(name='idea', action=SquareIdea).install('idea')
  task(name='new-idea', action=ShowNewIdeaMovedMessage).install('new-idea')
Ejemplo n.º 17
0
def register_goals():
  task(name='go', action=GoBuildgen).install('buildgen').with_description(
    'Automatically generate BUILD files.')
  task(name='go', action=GoFetch).install('resolve')
  task(name='go', action=GoCompile).install('compile')
  task(name='go', action=GoBinaryCreate).install('binary')
  task(name='go', action=GoRun).install('run')
  task(name='go', action=GoTest).install('test')
Ejemplo n.º 18
0
def register_goals():
    task(name="markdown", action=MarkdownToHtml).install(),
    task(name="reference", action=GeneratePantsReference).install()
Ejemplo n.º 19
0
def register_goals():
    task(name="kythe-java-extract", action=ExtractJava).install("index")
    task(name="kythe-java-index", action=IndexJava).install("index")
    task(name="bundle-entries", action=BundleEntries).install("index")
Ejemplo n.º 20
0
def register_goals():
    task(name='interpreter', action=SelectInterpreter).install('pyprep')
    task(name='build-local-dists',
         action=BuildLocalPythonDistributions).install('pyprep')
    task(name='requirements', action=ResolveRequirements).install('pyprep')
    task(name='sources', action=GatherSources).install('pyprep')
    task(name='py', action=PythonRun).install('run')
    task(name='pytest-prep', action=PytestPrep).install('test')
    task(name='pytest', action=PytestRun).install('test')
    task(name='py', action=PythonRepl).install('repl')
    task(name='setup-py', action=SetupPy).install()
    task(name='py', action=PythonBinaryCreate).install('binary')
    task(name='py-wheels',
         action=LocalPythonDistributionArtifact).install('binary')
    task(name='isort-prep', action=IsortPrep).install('fmt')
    task(name='isort', action=IsortRun).install('fmt')
    task(name='py', action=PythonBundle).install('bundle')
    task(name='unpack-wheels', action=UnpackWheels).install()
Ejemplo n.º 21
0
def register_goals():
    task(name='lambdex-prep', action=LambdexPrep).install('bundle')
    task(name='lambdex-run', action=LambdexRun).install('bundle')
Ejemplo n.º 22
0
def register_goals():
    task(name='ragel', action=RagelGen).install('gen')
Ejemplo n.º 23
0
def register_goals():
    ng_killall = task(name='ng-killall', action=NailgunKillall)
    ng_killall.install()

    Goal.by_name('invalidate').install(ng_killall, first=True)
    Goal.by_name('clean-all').install(ng_killall, first=True)

    task(name='jar-dependency-management',
         action=JarDependencyManagementSetup).install('bootstrap')

    task(name='jvm-platform-explain',
         action=JvmPlatformExplain).install('jvm-platform-explain')
    task(name='jvm-platform-validate',
         action=JvmPlatformValidate).install('jvm-platform-validate')

    task(name='bootstrap-jvm-tools',
         action=BootstrapJvmTools).install('bootstrap')
    task(name='provide-tools-jar', action=ProvideToolsJar).install('bootstrap')

    # Compile
    task(name='zinc', action=ZincCompile).install('compile')

    # Dependency resolution.
    task(name='ivy', action=IvyResolve).install('resolve', first=True)
    task(name='ivy-imports', action=IvyImports).install('imports')
    task(name='unpack-jars', action=UnpackJars).install()
    task(name='ivy', action=IvyOutdated).install('outdated')

    # Resource preparation.
    task(name='prepare', action=PrepareResources).install('resources')
    task(name='services', action=PrepareServices).install('resources')

    task(name='export-classpath', action=RuntimeClasspathPublisher).install()
    task(name='jvm-dep-check', action=JvmDependencyCheck).install('compile')

    task(name='jvm', action=JvmDependencyUsage).install('dep-usage')

    task(name='classmap', action=ClassmapTask).install('classmap')

    # Generate documentation.
    task(name='javadoc', action=JavadocGen).install('doc')
    task(name='scaladoc', action=ScaladocGen).install('doc')

    # Bundling.
    task(name='create', action=JarCreate).install('jar')
    detect_duplicates = task(name='dup', action=DuplicateDetector)

    task(name='jvm', action=BinaryCreate).install('binary')
    detect_duplicates.install('binary')

    task(name='consolidate-classpath',
         action=ConsolidateClasspath).install('bundle')
    task(name='jvm', action=BundleCreate).install('bundle')
    detect_duplicates.install('bundle')

    task(name='detect-duplicates', action=DuplicateDetector).install()

    # Publishing.
    task(name='check-published-deps',
         action=CheckPublishedDeps).install('check-published-deps')

    task(name='jar', action=JarPublish).install('publish')

    # Testing.
    task(name='junit', action=JUnitRun).install('test')
    task(name='bench', action=BenchmarkRun).install('bench')

    # Linting.
    task(name='scalafmt', action=ScalaFmtCheckFormat,
         serialize=False).install('lint')
    task(name='scalastyle', action=Scalastyle, serialize=False).install('lint')
    task(name='checkstyle', action=Checkstyle, serialize=False).install('lint')

    # Running.
    task(name='jvm', action=JvmRun, serialize=False).install('run')
    task(name='jvm-dirty', action=JvmRun, serialize=False).install('run-dirty')
    task(name='scala', action=ScalaRepl, serialize=False).install('repl')
    task(name='scala-dirty', action=ScalaRepl,
         serialize=False).install('repl-dirty')
    task(name='scalafmt', action=ScalaFmtFormat,
         serialize=False).install('fmt')
    task(name='test-jvm-prep-command',
         action=RunTestJvmPrepCommand).install('test', first=True)
    task(name='binary-jvm-prep-command',
         action=RunBinaryJvmPrepCommand).install('binary', first=True)
    task(name='compile-jvm-prep-command',
         action=RunCompileJvmPrepCommand).install('compile', first=True)
Ejemplo n.º 24
0
def register_goals():
    # Getting help.
    task(name='goals', action=ListGoals).install().with_description(
        'List all documented goals.')

    task(name='targets', action=TargetsHelp).install().with_description(
        'List all target types.')

    task(name='builddict', action=BuildBuildDictionary).install()

    # Cleaning.
    invalidate = task(name='invalidate',
                      action=Invalidator,
                      dependencies=['ng-killall'])
    invalidate.install().with_description('Invalidate all targets.')

    clean_all = task(name='clean-all',
                     action=Cleaner,
                     dependencies=['invalidate']).install()
    clean_all.with_description('Clean all build output.')
    clean_all.install(invalidate, first=True)

    clean_all_async = task(
        name='clean-all-async',
        action=AsyncCleaner,
        dependencies=['invalidate']).install().with_description(
            'Clean all build output in a background process.')
    clean_all_async.install(invalidate, first=True)

    # Reporting.

    task(name='server', action=RunServer,
         serialize=False).install().with_description(
             'Run the pants reporting server.')

    task(name='killserver', action=KillServer,
         serialize=False).install().with_description(
             'Kill the reporting server.')

    # Bootstrapping.
    task(name='prepare', action=PrepareResources).install('resources')

    task(name='markdown', action=MarkdownToHtml).install(
        'markdown').with_description('Generate html from markdown docs.')

    # Linting.

    task(name='check-exclusives', dependencies=['gen'],
         action=CheckExclusives).install('check-exclusives').with_description(
             'Check for exclusivity violations.')

    task(name='buildlint', action=BuildLint,
         dependencies=['compile']).install()

    task(
        name='pathdeps', action=PathDeps).install('pathdeps').with_description(
            'Print out all paths containing BUILD files the target depends on.'
        )

    task(name='list', action=ListTargets).install('list').with_description(
        'List available BUILD targets.')

    # Build graph information.

    task(name='path', action=Path).install().with_description(
        'Find a dependency path from one target to another.')

    task(name='paths', action=Paths).install().with_description(
        'Find all dependency paths from one target to another.')

    task(name='dependees', action=ReverseDepmap).install().with_description(
        "Print the target's dependees.")

    task(name='filemap', action=Filemap).install().with_description(
        'Outputs a mapping from source file to owning target.')

    task(name='minimize', action=MinimalCover).install().with_description(
        'Print the minimal cover of the given targets.')

    task(name='filter', action=Filter).install().with_description(
        'Filter the input targets based on various criteria.')

    task(name='sort', action=SortTargets).install().with_description(
        "Topologically sort the targets.")

    task(name='roots', action=ListRoots).install('roots').with_description(
        "Print the workspace's source roots and associated target types.")

    task(name='changed', action=WhatChanged).install().with_description(
        'Print the targets changed since some prior commit.')
Ejemplo n.º 25
0
def register_goals():
    task(name="cpp", action=CppCompile).install("compile")
    task(name="cpplib", action=CppLibraryCreate).install("binary")
    task(name="cpp", action=CppBinaryCreate).install("binary")
    task(name="cpp", action=CppRun).install("run")
Ejemplo n.º 26
0
def register_goals():
  task(name='extra-test-jar-example', action=ExtraTestJarExample).install('jar')
Ejemplo n.º 27
0
def register_goals():
    task(name="google-java-format", action=GoogleJavaFormatTask).install("fmt")
    task(name="google-java-format",
         action=GoogleJavaFormatLintTask).install("lint")
Ejemplo n.º 28
0
def register_goals():
    Goal.register('jax-ws-gen', 'Generated code for jax-ws xml templates.')
    task(name='jax-ws-gen', action=JaxWsGen).install('gen')
Ejemplo n.º 29
0
def register_goals():
  # IDE support.
  task(name='idea', action=IdeaGen).install().with_description(
      'Create an IntelliJ IDEA project from the given targets.')

  task(name='eclipse', action=EclipseGen).install().with_description(
      'Create an Eclipse project from the given targets.')

  task(name='ensime', action=EnsimeGen).install().with_description(
      'Create an Ensime project from the given targets.')

  task(name='export', action=Export).install().with_description(
    'Export project information for targets in JSON format. '
    'Use with resolve goal to get detailed information about libraries.')

  task(name='depmap', action=Depmap).install().with_description("Depict the target's dependencies.")

  task(name='dependencies', action=Dependencies).install().with_description(
      "Print the target's dependencies.")

  task(name='filedeps', action=FileDeps).install('filedeps').with_description(
      'Print out the source and BUILD files the target depends on.')
Ejemplo n.º 30
0
def register_goals():
  Goal.by_name('bootstrap').uninstall_task('jar-dependency-management')
  task(name='global-jar-dependency-management', action=JarDependencyGlobalManagementSetup).install('bootstrap')
  task(name='ivy', action=IvyGlobalResolve).install('resolve', first=True)
Ejemplo n.º 31
0
def register_goals():
    # Register tasks.
    task(name="node", action=NodeRepl).install("repl")
    task(name="node", action=NodeResolve).install("resolve")
    task(name="node", action=NodeRun).install("run")
    task(name="node", action=NodeBuild).install("compile", first=True)
    task(name="node", action=NodeTestTask).install("test")
    task(name="node", action=NodeBundleTask).install("bundle")
    task(name="node-install", action=NodeInstall).install()
    # Linting
    task(name="javascriptstyle", action=JavascriptStyleLint).install("lint")
    task(name="javascriptstyle", action=JavascriptStyleFmt).install("fmt")
Ejemplo n.º 32
0
def register_goals():
    task(name='thrift', action=ApacheThriftGen).install('gen')

    # TODO(Garrett Malmquist): 'protoc' depends on a nonlocal goal (imports is in the jvm register).
    # This should be cleaned up, with protobuf stuff moved to its own backend. (See John's comment on
    # RB 592).
    task(name='protoc', action=ProtobufGen).install('gen')

    task(name='antlr', action=AntlrGen).install('gen')
    task(name='ragel', action=RagelGen).install('gen')
    task(name='jaxb', action=JaxbGen).install('gen')
    task(name='wire', action=WireGen).install('gen')
Ejemplo n.º 33
0
def register_goals():
    task(name="grpcio-prep", action=GrpcioPrep).install("gen")
    task(name="grpcio-run", action=GrpcioRun).install("gen")
Ejemplo n.º 34
0
def register_goals():
    task(name="avro-java", action=AvroJavaGenTask).install("gen")
Ejemplo n.º 35
0
def register_goals():
  task(
    name='sitegen', action=SiteGen
  ).install('sitegen').with_description('Generate static web site.')
Ejemplo n.º 36
0
def register_goals():
  task(name='confluence', action=ConfluencePublish).install()
Ejemplo n.º 37
0
def register_goals():
    task(name='protoc', action=ProtobufGen).install('gen')
Ejemplo n.º 38
0
def register_goals():
    Goal.register(
        name="snyktest",
        description="Snyk Test your dependencies for vulnerabilities")
    task(name='dependencies', action=DependenciesTask).install('snyktest')
    task(name='snyk', action=SnykTask).install('snyktest')
Ejemplo n.º 39
0
def register_goals():

    task(
        name='map-third-party-jar-symbols',
        action=MapThirdPartyJarSymbols,
    ).install()

    task(
        name='map-scala-exported-symbols',
        action=MapScalaExportedSymbols,
    ).install()

    task(
        name='map-scala-used-symbols',
        action=MapScalaUsedSymbols,
    ).install()

    task(
        name='map-java-exported-symbols',
        action=MapJavaExportedSymbols,
    ).install()

    task(
        name='map-jvm-symbol-to-source-tree',
        action=MapJvmSymbolToSourceTree,
    ).install()

    task(
        name='map-scala-library-used-addresses',
        action=MapScalaLibraryUsedAddresses,
    ).install()

    task(
        name='scala',
        action=BuildgenScala,
    ).install('buildgen')
Ejemplo n.º 40
0
def register_goals():
  task(name='jaxb', action=JaxbGen).install('gen')
Ejemplo n.º 41
0
def register_goals():
  task(name='thrift', action=ApacheThriftGen).install('gen')
Ejemplo n.º 42
0
def register_goals():
    Goal.register('echo',
                  'test tasks that echo their target set',
                  options_registrar_cls=SkipAndTransitiveGoalOptionsRegistrar)
    task(name='one', action=EchoOne).install('echo')
    task(name='two', action=EchoTwo).install('echo')
Ejemplo n.º 43
0
def register_goals():
  Goal.register('findbugs', 'Check Java code for findbugs violations.')
  task(name='findbugs', action=FindBugs).install()
Ejemplo n.º 44
0
def register_goals():
  Goal.register('jar-manifest', 'Place a text file into META-INF/ with a list of all the 3rdparty jars bundled into a binary') 
  task(name='jar-manifest', action=JarManifestTask, serialize=False).install()
Ejemplo n.º 45
0
def register_goals():

  task(
    name='map-third-party-jar-symbols',
    action=MapThirdPartyJarSymbols,
  ).install()

  task(
    name='map-scala-exported-symbols',
    action=MapScalaExportedSymbols,
  ).install()

  task(
    name='map-scala-used-symbols',
    action=MapScalaUsedSymbols,
  ).install()

  task(
    name='map-java-exported-symbols',
    action=MapJavaExportedSymbols,
  ).install()

  task(
    name='map-jvm-symbol-to-source-tree',
    action=MapJvmSymbolToSourceTree,
  ).install()

  task(
    name='map-scala-library-used-addresses',
    action=MapScalaLibraryUsedAddresses,
  ).install()

  task(
    name='scala',
    action=BuildgenScala,
  ).install('buildgen')
Ejemplo n.º 46
0
def register_goals():
  task(name='thrift', action=ApacheThriftGen).install('gen')

  # TODO(Garrett Malmquist): 'protoc' depends on a nonlocal goal (imports is in the jvm register).
  # This should be cleaned up, with protobuf stuff moved to its own backend. (See John's comment on
  # RB 592).
  task(name='protoc', action=ProtobufGen).install('gen')

  task(name='antlr', action=AntlrGen).install('gen')
  task(name='ragel', action=RagelGen).install('gen')
  task(name='jaxb', action=JaxbGen).install('gen')
  task(name='wire', action=WireGen).install('gen')
Ejemplo n.º 47
0
def register_goals():
    task(name="protoc", action=ProtobufGen).install("gen")
Ejemplo n.º 48
0
def register_goals():
    task(name='spindle', action=SpindleGen).install('gen')
Ejemplo n.º 49
0
def register_goals():
  task(name='python-binary-create', action=PythonBinaryCreate).install('binary')
  task(name='pytest', action=PytestRun).install('test')
  task(name='py', action=PythonRun).install('run')
  task(name='py', action=PythonRepl).install('repl')
  task(name='setup-py', action=SetupPy).install()
Ejemplo n.º 50
0
def register_goals():
  task(name='google-java-format', action=GoogleJavaFormat).install('fmt')
  task(name='google-java-format', action=GoogleJavaFormatCheckFormat).install('lint')
Ejemplo n.º 51
0
def register_goals():
  # Turn on python "compilation" to enable basic sanity checks for python_library and python_binary
  # targets.
  task(name='python-eval', action=PythonEval).install('compile')
Ejemplo n.º 52
0
def register_goals():
    task(name='cpp', action=CppCompile).install('compile')
    task(name='cpplib', action=CppLibraryCreate).install('binary')
    task(name='cpp', action=CppBinaryCreate).install('binary')
    task(name='cpp', action=CppRun).install('run')
Ejemplo n.º 53
0
def register_goals():
  task(name='thrift', action=ApacheThriftGen).install('gen').with_description('Generate code.')

  task(name='scrooge', dependencies=['bootstrap'], action=ScroogeGen).install('gen')

  # TODO(Garrett Malmquist): 'protoc' depends on a nonlocal goal (imports is in the jvm register).
  # This should be cleaned up, with protobuf stuff moved to its own backend. (See John's comment on
  # RB 592).
  task(name='protoc', dependencies=['imports'], action=ProtobufGen
  ).install('gen')

  task(name='antlr', dependencies=['bootstrap'], action=AntlrGen
  ).install('gen')

  task(name='ragel', action=RagelGen).install('gen')

  task(name='jaxb', action=JaxbGen).install('gen')
Ejemplo n.º 54
0
def register_goals():
    task(name='findbugs', action=FindBugs).install('compile')
Ejemplo n.º 55
0
def register_goals():
  # Getting help.
  task(name='goals', action=ListGoals
  ).install().with_description('List all documented goals.')

  task(name='targets', action=TargetsHelp
  ).install().with_description('List target types and BUILD file symbols (python_tests, jar, etc).')

  task(name='builddict', action=BuildBuildDictionary
  ).install()


  # Cleaning.
  invalidate = task(name='invalidate', action=Invalidator, dependencies=['ng-killall'])
  invalidate.install().with_description('Invalidate all targets.')

  clean_all = task(name='clean-all', action=Cleaner, dependencies=['invalidate']).install()
  clean_all.with_description('Clean all build output.')
  clean_all.install(invalidate, first=True)

  class AsyncCleaner(Cleaner):
    def execute(self):
      print('The `clean-all-async` goal is deprecated and currently just forwards to `clean-all`.',
            file=sys.stderr)
      print('Please update your usages to `clean-all`.', file=sys.stderr)
      super(AsyncCleaner, self).execute()
  clean_all_async = task(name='clean-all-async', action=AsyncCleaner, dependencies=['invalidate']
  ).install().with_description('[deprecated] Clean all build output in a background process.')
  clean_all_async.install(invalidate, first=True)

  # Reporting.

  task(name='server', action=RunServer, serialize=False
  ).install().with_description('Run the pants reporting server.')

  task(name='killserver', action=KillServer, serialize=False
  ).install().with_description('Kill the reporting server.')


  # Bootstrapping.
  task(name='prepare', action=PrepareResources
  ).install('resources')

  task(name='markdown', action=MarkdownToHtml
  ).install('markdown').with_description('Generate html from markdown docs.')


  # Linting.

  task(name='check-exclusives', dependencies=['gen'], action=CheckExclusives
  ).install('check-exclusives').with_description('Check for exclusivity violations.')

  task(name='buildlint', action=BuildLint, dependencies=['compile']
  ).install()

  task(name='pathdeps', action=PathDeps).install('pathdeps').with_description(
    'Print out all paths containing BUILD files the target depends on.')

  task(name='list', action=ListTargets
  ).install('list').with_description('List available BUILD targets.')


  # Build graph information.

  task(name='path', action=Path
  ).install().with_description('Find a dependency path from one target to another.')

  task(name='paths', action=Paths
  ).install().with_description('Find all dependency paths from one target to another.')

  task(name='dependees', action=ReverseDepmap
  ).install().with_description("Print the target's dependees.")

  task(name='filemap', action=Filemap
  ).install().with_description('Outputs a mapping from source file to owning target.')

  task(name='minimize', action=MinimalCover
  ).install().with_description('Print the minimal cover of the given targets.')

  task(name='filter', action=Filter
  ).install().with_description('Filter the input targets based on various criteria.')

  task(name='sort', action=SortTargets
  ).install().with_description("Topologically sort the targets.")

  task(name='roots', action=ListRoots
  ).install('roots').with_description("Print the workspace's source roots and associated target types.")

  task(name='run_prep_command', action=RunPrepCommand
  ).install('test', first=True).with_description("Run a command before tests")

  task(name='changed', action=WhatChanged
  ).install().with_description('Print the targets changed since some prior commit.')
Ejemplo n.º 56
0
def register_goals():
    task(name='path', action=Path).install()
    task(name='paths', action=Paths).install()
    task(name='dependees', action=ReverseDepmap).install()
    task(name='filemap', action=Filemap).install()
    task(name='minimize', action=MinimalCover).install()
    task(name='filter', action=Filter).install()
    task(name='sort', action=SortTargets).install()
    task(name='cloc', action=CountLinesOfCode).install()
Ejemplo n.º 57
0
def register_goals():
   JvmPrepCommand.add_goal('jooq')
   task(name='jooq-jvm-prep-command', action=RunJooqJvmPrepCommand).install('jooq', first=True)
Ejemplo n.º 58
0
def register_goals():
    task(name='markdown', action=MarkdownToHtml).install()
Ejemplo n.º 59
0
def register_goals():
  task(name='cpp', action=CppCompile).install('compile')
  task(name='cpplib', action=CppLibraryCreate).install('binary')
  task(name='cpp', action=CppBinaryCreate).install('binary')
  task(name='cpp', action=CppRun).install('run')
Ejemplo n.º 60
0
def register_goals():
    ng_killall = task(name="ng-killall", action=NailgunKillall)
    ng_killall.install()

    Goal.by_name("invalidate").install(ng_killall, first=True)
    Goal.by_name("clean-all").install(ng_killall, first=True)

    task(name="jar-dependency-management",
         action=JarDependencyManagementSetup).install("bootstrap")

    task(name="jvm-platform-explain",
         action=JvmPlatformExplain).install("jvm-platform-explain")
    task(name="jvm-platform-validate",
         action=JvmPlatformValidate).install("jvm-platform-validate")

    task(name="bootstrap-jvm-tools",
         action=BootstrapJvmTools).install("bootstrap")
    task(name="provide-tools-jar", action=ProvideToolsJar).install("bootstrap")

    # Compile
    task(name="rsc", action=RscCompile).install("compile")
    task(name="javac", action=JavacCompile).install("compile")

    # Analysis extraction.
    task(name="zinc", action=AnalysisExtraction).install("analysis")

    # Dependency resolution.
    task(name="coursier", action=CoursierResolve).install("resolve")
    task(name="ivy-imports", action=IvyImports).install("imports")
    task(name="unpack-jars", action=UnpackJars).install()
    task(name="ivy", action=IvyOutdated).install("outdated")

    # Resource preparation.
    task(name="prepare", action=PrepareResources).install("resources")
    task(name="services", action=PrepareServices).install("resources")

    task(name="export-classpath", action=RuntimeClasspathPublisher).install()

    # This goal affects the contents of the runtime_classpath, and should not be
    # combined with any other goals on the command line.
    task(name="export-dep-as-jar", action=ExportDepAsJar).install()

    task(name="jvm", action=JvmDependencyUsage).install("dep-usage")

    task(name="classmap", action=ClassmapTask).install("classmap")

    # Generate documentation.
    task(name="javadoc", action=JavadocGen).install("doc")
    task(name="scaladoc", action=ScaladocGen).install("doc")

    # Bundling.
    task(name="create", action=JarCreate).install("jar")
    detect_duplicates = task(name="dup", action=DuplicateDetector)

    task(name="jvm", action=BinaryCreate).install("binary")
    detect_duplicates.install("binary")

    task(name="consolidate-classpath",
         action=ConsolidateClasspath).install("bundle")
    task(name="jvm", action=BundleCreate).install("bundle")
    detect_duplicates.install("bundle")

    task(name="detect-duplicates", action=DuplicateDetector).install()

    # Publishing.
    task(name="check-published-deps",
         action=CheckPublishedDeps).install("check-published-deps")

    task(name="jar", action=JarPublish).install("publish")

    # Testing.
    task(name="junit", action=JUnitRun).install("test")
    task(name="bench", action=BenchmarkRun).install("bench")

    # Linting.
    task(name="scalafix", action=ScalaFixCheck).install("lint")
    task(name="scalafmt", action=ScalaFmtCheckFormat,
         serialize=False).install("lint")
    task(name="scalastyle", action=ScalastyleTask,
         serialize=False).install("lint")
    task(name="checkstyle", action=Checkstyle, serialize=False).install("lint")
    task(name="jvm-dep-check", action=JvmDependencyCheck,
         serialize=False).install("lint")

    # Formatting.
    # Scalafix has to go before scalafmt in order not to
    # further change Scala files after scalafmt.
    task(name="scalafix", action=ScalaFixFix).install("fmt")
    task(name="scalafmt", action=ScalaFmtFormat,
         serialize=False).install("fmt")

    # Running.
    task(name="jvm", action=JvmRun, serialize=False).install("run")
    task(name="jvm-dirty", action=JvmRun, serialize=False).install("run-dirty")
    task(name="scala", action=ScalaRepl, serialize=False).install("repl")
    task(name="scala-dirty", action=ScalaRepl,
         serialize=False).install("repl-dirty")
    task(name="test-jvm-prep-command",
         action=RunTestJvmPrepCommand).install("test", first=True)
    task(name="binary-jvm-prep-command",
         action=RunBinaryJvmPrepCommand).install("binary", first=True)
    task(name="compile-jvm-prep-command",
         action=RunCompileJvmPrepCommand).install("compile", first=True)