To add android.jar to the classpath, create a copy under task's workdir.

Review Request #1902 - Created March 11, 2015 and submitted

Information
Mateo Rodriguez
pants
726e817...
Reviewers
pants-reviews
jsirois, stuhood

The classpath refactor requires that all classpath entries be under the
buildroot. The aapt_gen task was creating a synthetic target that added
android.jar from the local Android SDK. That failed with the new rule and
so as of CR 1885 Android support is broken.

register_android_tool now has an optional argument, that if passed serves
as the copy location. AndroidDistribution will copy the jar in under the buildroot
and therefore comply with the new classpath rule.

Travis passed: https://travis-ci.org/pantsbuild/pants/builds/54285205
Local integration tests that were failing now pass:

~/development/pants$ PANTS_DEV=1 ./pants test tests/python/pants_test/android::
                     ============== test session starts ===============
                     platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
                     plugins: cov, timeout
                     collected 70 items

                     tests/python/pants_test/android/tasks/test_aapt_builder_integration.py .
                     tests/python/pants_test/android/tasks/test_dx_compile_integration.py .
                     tests/python/pants_test/android/tasks/test_sign_apk_integration.py .
                     tests/python/pants_test/android/tasks/test_zipalign_integration.py .
                     tests/python/pants_test/android/tasks/test_zipalign.py ....
                     tests/python/pants_test/android/tasks/test_aapt_gen.py ..
                     tests/python/pants_test/android/tasks/test_sign_apk.py ...........
                     tests/python/pants_test/android/test_android_config_util.py ..
                     tests/python/pants_test/android/test_android_manifest_parser.py ..................
                     tests/python/pants_test/android/test_android_distribution.py .....................
                     tests/python/pants_test/android/test_keystore_resolver.py ........

                     =========== 70 passed in 23.84 seconds ===========
Mateo Rodriguez
John Sirois
Eric Ayers
Mateo Rodriguez
Mateo Rodriguez
Mateo Rodriguez
Mateo Rodriguez
Eric Ayers
John Sirois
Mateo Rodriguez
Mateo Rodriguez
Review request changed

Status: Closed (submitted)

Loading...