aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/android/BUILD
Commit message (Collapse)AuthorAge
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* Stop using zip and unzip in android shell tests.Gravatar ajmichael2017-05-04
| | | | | | | Also, open source two more tests. RELNOTES: None PiperOrigin-RevId: 155129416
* Improve AndroidSdkRepositoryTest.Gravatar Adam Michael2017-02-20
| | | | | | | | | | Also, remove some tests from android_integration_test.sh that are now covered by AndroidSdkRepositoryTest. This should hopefully reduce breakages of android_integration_test.sh that are not caught until the change makes its way to Jenkins. I haven't yet figured out how to move the environment variable settings tests into AndroidSdkRepositoryTest. -- PiperOrigin-RevId: 147864723 MOS_MIGRATED_REVID=147864723
* Create aliases for tools for upcoming android_device rule.Gravatar Adam Michael2017-01-27
| | | | | | | | Note that these aliases are intentionally not yet functional. Nothing should be trying to build them. -- PiperOrigin-RevId: 145746166 MOS_MIGRATED_REVID=145746166
* Don't bundle android tests into the Bazel binary.Gravatar Adam Michael2017-01-20
| | | | | | | | Saves 12kB! :) -- PiperOrigin-RevId: 144997917 MOS_MIGRATED_REVID=144997917
* Split tools/android/BUILD into BUILD and BUILD.tools.Gravatar Adam Michael2017-01-05
| | | | | | | | | | | | | | This should help clear up the confusion that caused https://github.com/bazelbuild/bazel/issues/2283. Now all of the following work: bazel build //tools/android/... bazel test //tools/android/... bazel build @bazel_tools//tools/android/... -- PiperOrigin-RevId: 143666995 MOS_MIGRATED_REVID=143666995
* Rollback of commit e81ff0e156647ae680346ac833313319e7ea69d6.Gravatar Alex Humesky2016-12-22
| | | | | | | | | | | | | | | | | *** Reason for rollback *** breaks bazel: https://github.com/bazelbuild/bazel/issues/2283 http://ci.bazel.io/job/bazel-tests/432/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Remove broken and unused Android tools aliases. -- PiperOrigin-RevId: 142768488 MOS_MIGRATED_REVID=142768488
* Remove broken and unused Android tools aliases.Gravatar Adam Michael2016-12-22
| | | | | | -- PiperOrigin-RevId: 142702623 MOS_MIGRATED_REVID=142702623
* Rollback of commit 27cd7f6bb4a02f56f9ad73e57e71e69a1c00d5ea.Gravatar Adam Michael2016-12-15
| | | | | | | | | | | | *** Reason for rollback *** Rolling forward, intentionally breaking loading phase (and therefore `bazel fetch`) for android_binary in Bazel if no android_sdk_repository is set up. Will not submit until Tensorflow's use case is cleaned up in https://github.com/tensorflow/tensorflow/pull/6225. -- PiperOrigin-RevId: 142068703 MOS_MIGRATED_REVID=142068703
* Open source resource_extractor.py for singlejar apk building.Gravatar Adam Michael2016-11-16
| | | | | | | Now, apks can be built faster in Bazel using the --use_singlejar_apkbuilder flag. -- MOS_MIGRATED_REVID=139285943
* Fix zip_manifest_creator dep in bazel_tools repo with an alias.Gravatar Adam Michael2016-10-26
| | | | | | | | | | | In commit 78c19807d2cbb308b830022dcdcc8b03f19f90a9 I accidentally broke aar_import when I moved zip_manifest_creator from tools/android to tools/zip because tools/android does not have separate BUILD and BUILD.tools files. The test did not catch this, because the dependency in tools/android/BUILD is correct in the context of the bazel tree but not in the context of the bazel_tools embedded workspace. -- MOS_MIGRATED_REVID=137209500
* Adds support to aar_import for native libs in /jni.Gravatar Adam Michael2016-10-25
| | | | | | | The libs that are extracted are dependent on the CPU from the Android split transition. This is set either from --fat_apk_cpu or --android_cpu if fat_apk_cpu is empty. -- MOS_MIGRATED_REVID=137188695
* Refactor AarImportRule into a base rule.Gravatar Adam Michael2016-10-14
| | | | | | | Also moves AAR-specific tools from tools/zip into tools/android and renames embedded_jar_extractor to aar_embedded_jars_extractor because in a future change it will extract classes.jar and libs/*.jar. -- MOS_MIGRATED_REVID=136099324
* Added support for rex to optionally compress dex files.Gravatar Googler2016-10-12
| | | | | -- MOS_MIGRATED_REVID=135805730
* Rollback of commit af8ebca2b88a0ee1129b72b4ce825f6489c31e67.Gravatar Damien Martin-Guillerez2016-10-05
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Break `bazel fetch ...` Discovered by bisecting `bazel fetch tensorflow/...`, see attached bug for more information Fixes https://github.com/bazelbuild/bazel/issues/1880 *** Original change description *** Open source dex merging tools for incremental dexing. Tested with bazel build --incremental_dexing_binary_types=monodex,multidex_unsharded,multidex_sharded -- //examples/android/java/bazel:hello_world -- MOS_MIGRATED_REVID=135220785
* Open source dex merging tools for incremental dexing.Gravatar Adam Michael2016-09-30
| | | | | | | | Tested with bazel build --incremental_dexing_binary_types=monodex,multidex_unsharded,multidex_sharded -- //examples/android/java/bazel:hello_world -- MOS_MIGRATED_REVID=134690103
* patch bootclasspath to allow javac to compile lambdas and method references ↵Gravatar Googler2016-09-28
| | | | | | | in android_* targets (behind existing flag). -- MOS_MIGRATED_REVID=134453743
* Change the filegroup for the android sdk to an alias to unbreak android in ↵Gravatar Alex Humesky2016-09-23
| | | | | | | bazel after commit 1092e9d68773adb7444cc85a47af650aeeaf65fc -- MOS_MIGRATED_REVID=134036851
* Java 8 support for Android builds, initially with incremental dexing only.Gravatar Googler2016-09-19
| | | | | -- MOS_MIGRATED_REVID=133436157
* Adds a jar filter to the IntelliJ IDE aspect.Gravatar Googler2016-09-06
| | | | | | | | | | | | | | | | Any java rule that mixes generated and non-generated sources will produce a filtered jar containing only the generated output. For a java rule with only "normal" sources or only generated source files, no filtered jar is produced. This will allow the IDE to resolve those generated sources. RELNOTES:None -- MOS_MIGRATED_REVID=132113568
* Add a resource validator action for android_libraryGravatar Googler2016-08-30
| | | | | | | | | | | | | | | | | | Part 3 of the 3 new proposed android_library res processing actions. Pulls a zip file from the merging action, unpacks it, and then validates the results with aapt. Get an R.txt and srcjar w/ javadocs from aapt. In order to the get the R.txt, I think you need to ask for the R.java sources anyway. Split the processResources() into a runAapt() function that can be reused. Hookup in bazel coming separately. -- MOS_MIGRATED_REVID=131618410
* Add a lightweight resource merge action.Gravatar Googler2016-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | Part 2 of the 3 new proposed android_library res processing actions. The primary and deps are all assumed to be parsed+summarized in a protobuf. Represent that with a new class (similar to DependencyAndroidData but w/out R.txt). Avoid having "manifest" artifacts as deps input, and instead use "label", since that is only used in a warning. DepAD still uses the manifest for #asSymbolFileProvider, so we keep it there. Move loading the primary out of the merge function so that we can share the merge function with this style of primary data, and the existing style of of primary data (UnvalidatedAndroidData). This produces an R class.jar and a zip file to pass along to a future validation action. Images are stubbed out since they are irrelevant to the validation action. -- MOS_MIGRATED_REVID=131604421
* Replaces sh_binary redirects with aliases in Bazel.Gravatar Adam Michael2016-08-18
| | | | | -- MOS_MIGRATED_REVID=130549870
* Add a resource parsing action.Gravatar Googler2016-07-28
| | | | | | | | | | | | | | | | | | | | | | Part of 3 proposed new actions: - parsing action - merging action - validating action Dependencies (directData and transitiveData) expect the symbol files. If the merge action produces the symbol files, then each merge action depends on each other. Instead, produce it in an action with just source resources as prereqs to allow more parallelism. Technically, we don't need a manifest as part of the parameters. I debated about whether to introduce a basic version of UnvalidatedAndroidData or not. -- MOS_MIGRATED_REVID=128599714
* More pieces of RClassGeneratorActionGravatar Googler2016-07-08
| | | | | | | | | | | | Add the rclass_generator.sh, and fill in the boiler-plate for mock tools, etc. Mostly cargo- culting references to resources_processor.sh. Rename earlier pieces to use RClassGenerator prefix instead of AndroidResourceCompilation. -- MOS_MIGRATED_REVID=126831848
* Adds the Android manifest merger as an option for android_binary rules. The ↵Gravatar Andrew Pellegrini2016-06-23
| | | | | | | | | merger that is used (legacy or android) is controlled by the manifest_merger attribute on android_binary and the default is controlled by the --android_manifest_merger flag. RELNOTES: The Android manifest merger is now available as an option for android_binary rules. The merger will honor tools annotations in AndroidManifest.xml and will perform placeholder substitutions using the values specified in android_binary.manifest_values. The merger may be selected by setting the manifest_merger attribute on android_binary. -- MOS_MIGRATED_REVID=125603954
* Rollback of commit bda8ae9212621da50d6b18f185f99450fb6d6da9.Gravatar Lukacs Berki2016-06-06
| | | | | | | | | | | | | | | *** Reason for rollback *** Cannot be built with currently released Bazel. *** Original change description *** Remove redirect chasing from AndroidConfiguration.Loader. With aliases, it's not necessary anymore. -- MOS_MIGRATED_REVID=124123904
* Migrate to alias-based redirection for android_sdk.Gravatar Lukacs Berki2016-06-06
| | | | | -- MOS_MIGRATED_REVID=123971774
* Set --android_sdk=@bazel_tools//tools/android:sdk by default and delete ↵Gravatar Luis Fernando Pino Duque2016-04-27
| | | | | | | | | Constants.ANDROID_DEFAULT_SDK. This CL also updates the test infrastructure to include a mock of @bazel_tools//tools/android:sdk. -- MOS_MIGRATED_REVID=120815577
* Incremental dexing for sharded android_binary targetsGravatar Googler2016-03-15
| | | | | -- MOS_MIGRATED_REVID=117186609
* Adds the ResourceShrinkerAction. Uses the results of resource processing and ↵Gravatar Andrew Pellegrini2016-02-23
| | | | | | | a dead code removal Proguard pass to create an ap_ without unused resources to be used when building android_binary targets. -- MOS_MIGRATED_REVID=115227385
* ASwB aspect: parse java packages during executionGravatar Googler2015-12-03
| | | | | -- MOS_MIGRATED_REVID=109305952
* Allow Java libraries to export and propagate proguard_specs.Gravatar Michael Staib2015-10-06
| | | | | | | | | | | | | | | It may be the case that a library used by Java clients is also used by Android clients, but when used for the latter, it requires a particular Proguard configuration. This change modifies Java library rules to accept Proguard specs and pass them up to Android rules. Note that this does not cause Proguard to be used on normal Java binaries. RELNOTES[NEW]: java_library now supports the proguard_specs attribute for passing Proguard configuration up to Android (not Java) binaries. -- MOS_MIGRATED_REVID=104661799
* Refactors proguard_whitelister.Gravatar Alex Humesky2015-09-30
| | | | | -- MOS_MIGRATED_REVID=104150148
* Add Android IDL jar outputs.Gravatar Googler2015-09-28
| | | | | | | | | | These outputs are a jar and source jar for the results of aidl processing. This is used to add aidl output to IDEs separate from the source code, similar to annotation output (gen jars). -- MOS_MIGRATED_REVID=104024453
* Make android_binary use a constant, hard-coded, checked-in debug key. Gravatar Lukacs Berki2015-09-04
| | | | | | | This is because apkbuilder uses $HOME/.android/debug.keystore by default, which does not exist when running within the sandbox, thus, it always generates a new debug key, and thus, "adb install -r" doesn't work. -- MOS_MIGRATED_REVID=102331570
* Fix the name of the android tools dependenciesGravatar Damien Martin-Guillerez2015-09-03
| | | | | | | Fixes #419. -- MOS_MIGRATED_REVID=102248331
* Add glue logic to make the dex_shards attribute of android_binary work in Bazel.Gravatar Lukacs Berki2015-08-04
| | | | | -- MOS_MIGRATED_REVID=99567637
* The final CL in getting Android support to work: add resources_processor.sh ↵Gravatar Lukacs Berki2015-06-30
| | | | | | | and aar_generator.sh to the tools directory and make stub applications proper android_library rules instead of stub filegroups. -- MOS_MIGRATED_REVID=97206853
* Open source AarGeneratorAction and AndroidResourceProcessingAction.Gravatar Andrew Pellegrini2015-06-26
| | | | | -- MOS_MIGRATED_REVID=96883818
* This CL adds the android_binary rule to Bazel. Gravatar Lukacs Berki2015-06-16
| | | | | | | Note that despite the rule being present, Android support is still not functional: two tools (//tools/android:{aar_generator,resources_processor} are still missing (and are a-coming!) -- MOS_MIGRATED_REVID=96099045
* Various odds and ends in preparation for adding the Android rules to ↵Gravatar Lukacs Berki2015-06-12
| | | | | | | | | | | | BazelRuleClassProvider: - Add stub targets to tools/android/BUILD - Make Constants.ANDROID_DEFAULT_SDK non-constant so that the classfile can be replaced in the .jar - Make AndroidTools complain if --android_sdk does not point to an android_sdk rule. - Make the default visibility in the BUILD file generated by android_sdk_repository public -- MOS_MIGRATED_REVID=95816158