aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/android
Commit message (Collapse)AuthorAge
* Use a separate implicit dependency for dexbuilder in proguarded android buildsGravatar kmb2018-02-21
| | | | | | RELNOTES: None. PiperOrigin-RevId: 186511953
* Add an alias to import_deps_checker. The follow-up cl will reference this aliasGravatar cnsun2018-02-21
| | | | | | | | | to check the completeness of the deps of aar_import targets. Followup cl of unknown commit RELNOTES: None. PiperOrigin-RevId: 186503514
* Hooks to support core library desugaring in Android buildsGravatar kmb2018-02-07
| | | | | | RELNOTES: None. PiperOrigin-RevId: 184909685
* Support legacy multidex.Gravatar ajmichael2018-02-05
| | | | | | | Fix the create_main_dex_list stub script to find the dx jar binary correctly. RELNOTES: None PiperOrigin-RevId: 184532530
* Create @bazel_tools//tools/android:android_jar.Gravatar ajmichael2018-01-26
| | | | | RELNOTES: Replace //tools/defaults:android_jar with @bazel_tools//tools/android:android_jar. //tools/defaults:android_jar will be removed in a future release. PiperOrigin-RevId: 183404151
* Stop setting annotations_jar in Bazel android_sdk.Gravatar ajmichael2018-01-26
| | | | | | | It is optional as of https://github.com/bazelbuild/bazel/commit/1a6ca6f47aef36d56b5cb2f9da114af75dde583d. RELNOTES: None PiperOrigin-RevId: 183391869
* Stop bundling proguard.jar from android sdk into our integration tests.Gravatar ajmichael2018-01-25
| | | | | | | We don't use it. RELNOTES: None PiperOrigin-RevId: 183275864
* Pass the correct path of aapt_binary and merge its data runfiles into ↵Gravatar jingwen2018-01-23
| | | | | | | | android_instrumentation_test's runfiles. GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 182940009
* aar_resources_extractor ignore empty res/ and assets/ dirs.Gravatar ajmichael2018-01-18
| | | | | RELNOTES: None PiperOrigin-RevId: 182416060
* Point android_instrumentation_test's test runner to the vendoredGravatar jingwen2018-01-17
| | | | | | | | deploy jar at @android_test_support//:instrumentation_test_runner alias to @android_test_support//opensource:entry_point_deploy.jar GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 182310718
* Add assets support to aar_import.Gravatar ajmichael2018-01-16
| | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4439. Empty assets are handled by writing out an empty file named "assets/empty_asset_generated_by_bazel~", which will silently be ignored by AAPT. RELNOTES: aar_import now supports assets. PiperOrigin-RevId: 182110400
* Clean up Windows config_settingsGravatar Yun Peng2018-01-12
| | | | | | | | | | | | | | 1.Deleted config_setting for --cpu=x64_windows_msys, because we don't build Bazel with MSYS gcc anymore. 2.Deleted config_setting for --cpu=x64_windows_msvc, because it uses exactly the same toolchain as --cpu=x64_windows, it'll be removed in the future. This change reduces the complexity of our BUILD files and make them less confusing. Change-Id: I939831a6861413b0f745fb1be98aacd4fb780e0a PiperOrigin-RevId: 181751853
* Remove unused filegroup.Gravatar ajmichael2017-12-20
| | | | | RELNOTES: None PiperOrigin-RevId: 179760609
* More updates to tools/android modules for compatibility with python 3.Gravatar Googler2017-12-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 179577497
* Ensure that the target package in the <instrumentation> tag of the ↵Gravatar jingwen2017-12-19
| | | | | | | | | | | | instrumentation android_binary's AndroidManifest.xml references the correct package name of the instrumented android_binary. During an instrumentation test, ART will use the targetPackage specified in the instrumentation APK's AndroidManifest to determine the application to be instrumented. We can perform this check in Bazel at execution time, before the apps are loaded onto the device. See android_instrumentation_test_integration_test.sh for the e2e example. GITHUB: https://github.com/bazelbuild/bazel/issues/903 RELNOTES: None. PiperOrigin-RevId: 179564246
* Update tools/ modules for compatibility with python 3.Gravatar Akira Baruah2017-12-18
| | | | | | | | | Fixes #4097. Fixes part of #4310. Closes #4265. PiperOrigin-RevId: 179437184
* Refactor flag access out of Adb._Exec() and into main().Gravatar Akira Baruah2017-12-13
| | | | | | | | | | Rather than access the `extra_adb_arg` command line flag directly, the `Adb` class now receives the flag value in its constructor, preventing an error where flags are accessed before they are parsed (prohibited in `absl.flags`). If the constructor arg isn't passed at all, the value stored in the `Adb` object defaults to an empty list. PiperOrigin-RevId: 178906612
* Automated rollback of commit 7b540204eea9b003e19efe917abacf67270f5e02.Gravatar tomlu2017-12-06
| | | | | | | | | | | | | *** Reason for rollback *** Breaks rapid candidate creation *** Original change description *** This and further changes may contain minor modifications to BUILD files that don't serve any apparent purpose. The reason for these changes is that we're switching from checked-in BUILD files to generated BUILD files, and there may be small differences between these files. RELNOTES: None PiperOrigin-RevId: 178120126
* Add aapt2 to the filegroup of integration test dependencies.Gravatar ajmichael2017-12-05
| | | | | | | | | This will allow us to write a bazel integration test for --android_aapt=aapt2. Necessary for https://github.com/bazelbuild/bazel/issues/4103. RELNOTES: None PiperOrigin-RevId: 177980382
* This and further changes may contain minor modifications to BUILD files that ↵Gravatar tomlu2017-12-05
| | | | | | | don't serve any apparent purpose. The reason for these changes is that we're switching from checked-in BUILD files to generated BUILD files, and there may be small differences between these files. RELNOTES: None PiperOrigin-RevId: 177949511
* Move bazel conditions into src/conditions.Gravatar tomlu2017-11-30
| | | | | | | This will enable an easier transition from checked-in BUILD files to ones generated by copybara. RELNOTES: None PiperOrigin-RevId: 177514519
* Build databinding annotation processor in host configuration.Gravatar ajmichael2017-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, add a fake databinding processor target. Bazel users will need to do something like this: # WORKSPACE local_repository( name = "databinding", path = "./databinding", ) bind( name = "databinding_annotation_processor", actual = "@databinding//:annotation_processor", ) # databinding/BUILD java_plugin( name = "annotation_processor", ... ) ... https://github.com/bazelbuild/bazel/issues/2694 RELNOTES: None PiperOrigin-RevId: 175975110
* Open source ZipFilterBuilder for android_instrumentation_testGravatar jingwen2017-11-13
| | | | | | | GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 175600267
* Fix ImportError on tools.android for junction_libGravatar jingwen2017-11-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 174503874
* Alias recently added tool as //tools/android:dexsharder for use by BazelGravatar kmb2017-11-01
| | | | | | RELNOTES: None. PiperOrigin-RevId: 174124176
* Android,Windows: longpath support in toolGravatar Laszlo Csomor2017-10-24
| | | | | | | | | | Update aar_native_libs_zip_creator.py to support long paths by using junctions. See https://github.com/bazelbuild/bazel/issues/3955 Change-Id: Iafa9ceca9f2a9076f220bd6326c95e5fb8b27f63 PiperOrigin-RevId: 173244903
* Add aapt2 to Bazel-generated android_sdks.Gravatar ajmichael2017-10-18
| | | | | RELNOTES: None PiperOrigin-RevId: 172481590
* Add a whitelist for packages that can contain android_devices rules. ↵Gravatar ajmichael2017-10-06
| | | | | | | Currently, this whitelist includes every package. RELNOTES: None PiperOrigin-RevId: 171192613
* Use bundled proguard 5.3.3 instead of 4.7 from the SDKGravatar ajmichael2017-10-06
| | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/3777 Also adds a proguard integration test so that hopefully we notice next time it breaks. RELNOTES: Updated Android proguard to 5.3.3. It now works with android-24+. PiperOrigin-RevId: 171162295
* deps -> exports in bazel mobile-install stub app.Gravatar ajmichael2017-09-28
| | | | | RELNOTES: None PiperOrigin-RevId: 170198788
* Windows,Android: support long paths in toolGravatar Laszlo Csomor2017-09-28
| | | | | | | | | | | | //tools/android/aar_embedded_jars_extractor.py now supports long paths using the same junction-creating trick as aar_resources_extractor does. Fixes https://github.com/bazelbuild/bazel/issues/3808 Change-Id: I2db25b0536ac3a97f4a04191bc398eb236923a7c PiperOrigin-RevId: 170193093
* Windows, aar_resources_extractor: longpath bugfixGravatar Laszlo Csomor2017-09-27
| | | | | | | | | | | | | | | | | | Fix a bug in the Android tool aar_resources_extractor: open the compressed data and the target file as file descriptores, rather than using aar.extract. This way we can shorten the directories in the relative path of the extracted file, because we can open the target file via a junction and thus work around long path limitations. //tools/android:aar_resources_extractor_test now passes on Windows. Change-Id: I9f5c7de2279ad8769e53e015b8334a58a76cd989 PiperOrigin-RevId: 170181143
* Android, Python tools: bugfix in junction.pyGravatar Laszlo Csomor2017-09-27
| | | | | | | | | junction.TempJunction now can create all parent directories of the junction target if they don't exist. Change-Id: I3e9cf34e78a3eb1ef9415036b791843a3b37f7c1 PiperOrigin-RevId: 170176180
* Limit //external:android_sdk_for_testing to only the minimum files needed.Gravatar ajmichael2017-09-27
| | | | | | | | | | Note that the support libraries are excluded on Windows, because Windows runfiles are zipped and the support libraries are very big. First step towards https://github.com/bazelbuild/bazel/issues/3663 RELNOTES: None PiperOrigin-RevId: 170057391
* Update Bazel's android_device support to use new emulator paths.Gravatar ajmichael2017-09-26
| | | | | | | | | | | Also, bundle snapshots.img in Bazel since it was removed from the SDK. Part of the fix for https://github.com/bazelbuild/bazel/issues/3504 Note that this will require an update to unified launcher at https://github.com/google/android-testing-support-library RELNOTES: None PiperOrigin-RevId: 169937694
* Make android_sdk_repository resilient to prerelease and malformed system imagesGravatar ajmichael2017-09-06
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/3672 RELNOTES: None PiperOrigin-RevId: 167581302
* Android,Windows: support long paths in toolingGravatar Laszlo Csomor2017-09-05
| | | | | | | | | | | | | | | | | | | aar_resources_extractor now supports long paths on Windows. If the script needs to extract a file from the AAR where the destination path is too long, the script will: 1. create a temporary junction under a short path, pointing to the destination directory (which has a long path) 2. extract the file under the junction 3. delete the junction and the temp directory See https://github.com/bazelbuild/bazel/issues/3659 Change-Id: Ie85665b360a6514afaac546aaec8869224fe9d06 PiperOrigin-RevId: 167545085
* Android,Windows: wrap SingleJar in a java_binaryGravatar Laszlo Csomor2017-09-01
| | | | | | | | | | | | | | | | | | | | | | On Unix-like platforms, we can execute deploy jars just like normal binaries, but on Windows we cannot because ".jar" is not an executable extension. Therefore we cannot run SingleJar_deploy.jar in a genrule.cmd. In this change I do the following changes to: //tools/android/BUILD.tools: - add a java_import rule that wraps the SingleJar deploy jar - add a java_binary that runtime-depends on the jar - fix the ":gen_java_lang_extras_jar" genrule to run the java_binary instead of the deploy jar See https://github.com/bazelbuild/bazel/issues/3659 Change-Id: Ie035e721deb696bbd4130b3612695a10dd9c2b4d PiperOrigin-RevId: 167281195
* Remove unused android_library.resource_extractor attributes in the depot.Gravatar jingwen2017-08-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 167142666
* Remove resource_extractor from Bazel's android_sdk rules.Gravatar ajmichael2017-08-31
| | | | | RELNOTES: None PiperOrigin-RevId: 167027537
* aar_import creates res/values/empty.xml if it contains no resources.Gravatar ajmichael2017-08-29
| | | | | | | | | To do this, add a new tool that is used instead of zipper to get the resources out of the AAR. This tool creates res/values/empty.xml if there are no resources in the AAR. Also, some general cleaning of the code. RELNOTES: None PiperOrigin-RevId: 166768607
* Busybox all the Bazel Android tools.Gravatar ajmichael2017-08-25
| | | | | | | | | This change reduces the size taken up in the bazel binary by Android tools deploy jars from 38.2 mb to 9.8 mb, which is 15% of the bazel binary size. Also, some minor cleanups of our BUILD files. https://github.com/bazelbuild/bazel/issues/2385 RELNOTES: None PiperOrigin-RevId: 166373241
* Android,tools: don't open zip file in binary modeGravatar laszlocsomor2017-08-10
| | | | | | | | Zip files are always opened in binary mode and the ctor doesn't accept "b" in the mode string. RELNOTES: none PiperOrigin-RevId: 164832193
* Android,tools: open all files in binary modeGravatar Laszlo Csomor2017-08-10
| | | | | | | | | | | | | | | Always open files in binary mode to avoid automatic conversion between LF and CRLF on Windows, which is particularly problematic when a file is written on Windows but consumed on Android or when a binary file is opened for reading in text mode and if it happens to have an LF byte it would be converted to CRLF. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I4d9d885a488b9693eeb3f6d929e3396ef8406d62 PiperOrigin-RevId: 164826587
* Windows,Android: mobile-install fully worksGravatar Laszlo Csomor2017-08-10
| | | | | | | | | | | | | | | | One of the output files in the incremental apk (stub_application_data.txt) was using CRLF on Windows, so the mobile-install'ed app was crashing on startup. Fix is to open the output file in binary mode so line endings are not converted to the host-platform-native one. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: Id7d4b5aa4362a21e699517b97dd24858c396eaa7 PiperOrigin-RevId: 164722314
* Windows, Android: fix mobile-installGravatar Laszlo Csomor2017-08-08
| | | | | | | | | | | The Adb command needs the SYSTEMROOT environment variable (as does Bazel), otherwise it produces weird errors. So add that to Adb's environment. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: Ia393f32ef00e21c90e4fc6d4a3188b7987aa89b0 PiperOrigin-RevId: 164454924
* Remove old intellij aspect code bundled with BazelGravatar Googler2017-07-31
| | | | PiperOrigin-RevId: 163538636
* Make $jarjar_bin point to //tools/android:jarjar_bin.Gravatar ajmichael2017-07-24
| | | | | | | Fixes TODO in AndroidRuleClasses.java. RELNOTES: None PiperOrigin-RevId: 162955052
* zip_manifest_creator: fix rlocation on WindowsGravatar Laszlo Csomor2017-07-14
| | | | | | | | | | | | Apparently `rlocation` is not defined in the environment of regular sh_binary rules, only in tests. So this commit adds an implementation for it. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I70ecb91cef5e1b66679e6ba04823831183da5cd9 PiperOrigin-RevId: 161775438
* Fix #3326 by making sure only one zipper is selected.Gravatar John Cater2017-07-10
| | | | | Change-Id: Ib061c85900e577f3548d47e8fa86086dfec9654a PiperOrigin-RevId: 161360338