Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 21:49:14 00:01 [ivy]
- Invalidated 12 targets containing 12 payload files.
- 21:49:14 00:01 [ivy-resolve]
- 21:49:14 00:01 [ivy]
- 21:49:14 00:01 [compile]
- 21:49:14 00:01 [jvm]
- 21:49:14 00:01 [jvm-compilers]
- 21:49:14 00:01 [test]
- 21:49:14 00:01 [pytest]
- 21:49:14 00:01 [run]
- ============== test session starts ===============
- platform linux2 -- Python 2.7.6 -- py-1.4.20 -- pytest-2.5.2
- plugins: cov, timeout
- collected 11 items
- tests/python/pants_test/tasks/test_jar_publish_integration.py ..
- tests/python/pants_test/python/test_interpreter_selection_integration.py .s.
- tests/python/pants_test/python/test_python_repl_integration.py .
- tests/python/pants_test/tasks/test_jvm_bundle_integration.py .
- tests/python/pants_test/python/test_python_run_integration.py s.
- tests/python/pants_test/tasks/test_scala_repl_integration.py .
- tests/python/pants_test/targets/test_scala_library_integration.py .
- ===== 9 passed, 2 skipped in 150.22 seconds ======
- 21:51:45 02:32 [junit]
- 21:51:45 02:32 [specs]
- SUCCESS
- [== CI SUCCESS ==]
- mateor@mateor-HP-m6:~/development/pants$ git diff origin/master
- diff --git a/src/python/pants/backend/android/BUILD b/src/python/pants/backend/android/BUILD
- new file mode 100644
- index 0000000..ce110f7
- --- /dev/null
- +++ b/src/python/pants/backend/android/BUILD
- @@ -0,0 +1,11 @@
- +# coding=utf-8
- +# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
- +# Licensed under the Apache License, Version 2.0 (see LICENSE).
- +
- +python_library(
- + name = 'plugin',
- + sources = ['__init__.py', 'register.py'],
- + dependencies = [
- + pants('src/python/pants/backend/android/targets:android'),
- + ]
- +)
- \ No newline at end of file
- diff --git a/src/python/pants/backend/android/__init__.py b/src/python/pants/backend/android/__init__
- new file mode 100644
- index 0000000..e69de29
- diff --git a/src/python/pants/backend/android/register.py b/src/python/pants/backend/android/register
- new file mode 100644
- index 0000000..49f19a0
- --- /dev/null
- +++ b/src/python/pants/backend/android/register.py
- @@ -0,0 +1,42 @@
- +# coding=utf-8
- +# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
- +# Licensed under the Apache License, Version 2.0 (see LICENSE).
- +
- +from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
- + print_function, unicode_literals)
- +
- +from pants.goal import Goal as goal
- +
- +from pants.backend.android.targets.android_binary import AndroidBinary
- +from pants.backend.android.targets.android_target import AndroidTarget
- +
- +
- +def target_aliases():
- + return {
- + 'android_binary': AndroidBinary,
- + 'android_target': AndroidTarget,
- + }
- +
- +
- +def object_aliases():
- + return {}
- +
- +
- +def partial_path_relative_util_aliases():
- + return {}
- +
- +
- +def applicative_path_relative_util_aliases():
- + return {}
- +
- +
- +def target_creation_utils():
- + return {}
- +
- +
- +def register_commands():
- + pass
- +
- +
- +def register_goals():
- + pass
- \ No newline at end of file
- diff --git a/src/python/pants/backend/android/targets/BUILD b/src/python/pants/backend/android/target
- new file mode 100644
- index 0000000..cc57051
- --- /dev/null
- +++ b/src/python/pants/backend/android/targets/BUILD
- @@ -0,0 +1,23 @@
- +# coding=utf-8
- +# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
- +# Licensed under the Apache License, Version 2.0 (see LICENSE).
- +
- +python_library(
- + name = 'all',
- + dependencies = [
- + ':android',
- + ],
- +)
- +
- +python_library(
- + name = 'android',
- + sources = [
- + 'android_binary.py',
- + 'android_target.py',
- + ],
- + dependencies = [
- + pants('src/python/pants/base:payload'),
- + pants('src/python/pants/base:target'),
- + pants('src/python/pants/backend/core/targets:common'),
- + ],
- +)
- \ No newline at end of file
- diff --git a/src/python/pants/backend/android/targets/__init__.py b/src/python/pants/backend/android/
- new file mode 100644
- index 0000000..e69de29
- diff --git a/src/python/pants/backend/android/targets/android_binary.py b/src/python/pants/backend/an
- new file mode 100644
- index 0000000..221a335
- --- /dev/null
- +++ b/src/python/pants/backend/android/targets/android_binary.py
- @@ -0,0 +1,40 @@
- +# coding=utf-8
- +# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
- +# Licensed under the Apache License, Version 2.0 (see LICENSE)
- +
- +from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
- + print_function, unicode_literals)
- +
- +from pants.backend.android.targets.android_target import AndroidTarget
- +
- +
- +class AndroidBinary(AndroidTarget):
- + """Produces an Android binary."""
- +
- + def __init__(self,
- + name=None,
- + sources=None,
- + provides=None,
- + dependencies=None,
- + excludes=None,
- + **kwargs):
- + """
- + :param string name: The name of this target, which combined with this
- + build file defines the target :class:`pants.base.address.Address`.
- + :param sources: A list of filenames representing the source code.
- + :type sources: list of strings
- + :param excludes: One or more :class:`pants.targets.exclude.Exclude` instances
- + to filter this target's transitive dependencies against.
- + :param package: Package name of app, e.g. 'com.pants.examples.hello'
- + :type package: string
- + :param resources: name of directory containing the android resources. Set as 'res' by default.
- + :param build_tools_version: API for the Build Tools (separate from SDK version).
- + Default to latest available
- + :param target_sdk_version: Version of the Android SDK the android target is built for
- + :param min_sdk_version: Earliest supported SDK by the android target
- + :param release_type: Which keystore is used to sign target: 'debug' or 'release'.
- + Set as 'debug' by default.
- + """
- +
- + # TODO: Add some Compatibility error checks.
- + super(AndroidBinary, self).__init__(name=name, sources=sources, **kwargs)
- diff --git a/src/python/pants/backend/android/targets/android_target.py b/src/python/pants/backend/an
- new file mode 100644
- index 0000000..d196423
- --- /dev/null
- +++ b/src/python/pants/backend/android/targets/android_target.py
- @@ -0,0 +1,61 @@
- +# coding=utf-8
- +# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
- +# Licensed under the Apache License, Version 2.0 (see LICENSE)
- +
- +from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
- + print_function, unicode_literals)
- +
- +from pants.base.payload import JvmTargetPayload
- +from pants.base.target import Target
- +
- +
- +class AndroidTarget(Target):
- + """A base class for all Android targets"""
- +
- + def __init__(self,
- + address=None,
- + sources=None,
- + sources_rel_path=None,
- + excludes=None,
- + provides=None,
- + package=None,
- + resources="res",
- + # most recent build_tools_version should be defined elsewhere
- + build_tools_version="19.1.0",
- + target_sdk_version=None,
- + min_sdk_version=None,
- + release_type="debug",
- + **kwargs):
- + """
- + :param string name: The name of this target, which combined with this
- + build file defines the target :class:`pants.base.address.Address`
- + :param sources: A list of filenames representing the source code.
- + :type sources: list of strings
- + :param excludes: One or more :class:`pants.targets.exclude.Exclude` instances
- + to filter this target's transitive dependencies against.
- + :param package: Package name of app, e.g. 'com.pants.examples.hello'
- + :type package: string
- + :param resources: name of directory containing the android resources. Set as 'res' by default.
- + :param build_tools_version: API for the Build Tools (separate from SDK version).
- + Default to latest available
- + :param target_sdk_version: Version of the Android SDK the android target is built for
- + :param min_sdk_version: Earliest supported SDK by the android target
- + :param release_type: Which keystore is used to sign target: 'debug' or 'release'.
- + Set as 'debug' by default.
- + """
- +
- + sources_rel_path = sources_rel_path or address.spec_path
- + # No reasons why we might need AndroidPayload have presented themselves yet
- + payload = JvmTargetPayload(sources=sources,
- + sources_rel_path=sources_rel_path,
- + provides=provides,
- + excludes=excludes)
- + super(AndroidTarget, self).__init__(address=address, payload=payload, **kwargs)
- +
- + self.add_labels('android')
- + self.build_tools_version = build_tools_version
- + self.min_sdk_version = min_sdk_version
- + self.package = package
- + self.release_type = release_type
- + self.resources = resources
- + self.target_sdk_version = target_sdk_version
- diff --git a/src/python/pants/base/target.py b/src/python/pants/base/target.py
- index d04c982..011b076 100644
- --- a/src/python/pants/base/target.py
- +++ b/src/python/pants/base/target.py
- @@ -94,6 +94,10 @@ class AbstractTarget(object):
- """Returns True if the target is comprised of tests."""
- return self.has_label('tests')
- + @property
- + def is_android(self):
- + """Returns True if the target is an android target."""
- + return self.has_label('android')
- @manual.builddict()
- class Target(AbstractTarget):
- mateor@mateor-HP-m6:~/development/pants$ git log origin/master -1
- commit bfc3f494a7d139f8f629a45ad0e2faa12dcab5d7
- Author: Stu Hood <stuhood@twitter.com>
- Date: Fri Jun 20 16:10:15 2014 -0700
- Squashed commit of the following:
- Credit Larry and Tejal
- Fix antlr_gen task and java_antly_library target
- mateor@mateor-HP-m6:~/development/pants$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement