aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android
Commit message (Collapse)AuthorAge
* Expose aar to Skylark.Gravatar Googler2016-09-09
| | | | | -- MOS_MIGRATED_REVID=132551909
* Remove dependency data from AarGeneratorActionGravatar Googler2016-09-08
| | | | | | | | | | | It's not supposed to cover direct deps and trans deps according to the documentation anyway. Also prepare to move the --strictMerge flag. The option isn't checked anymore. There's only one type of merging. -- MOS_MIGRATED_REVID=132444314
* Fix progress message for apksigner.Gravatar Adam Michael2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132088164
* Migrate JavaSourceJarsProvider and JavaCompilationArgsProvider to @AutoValue.Gravatar Googler2016-09-02
| | | | | -- MOS_MIGRATED_REVID=131995795
* Description redacted.Gravatar Adam Michael2016-09-02
| | | | | -- MOS_MIGRATED_REVID=131986739
* Adds support for ApkSignerTool and APK signature schema v2 behind ↵Gravatar Adam Michael2016-09-01
| | | | | | | | | --apk_signing_method flag. Default is legacy_v1 which is the already existing functionality. Promotes AndroidBinary.ApkActionBuilder to a toplevel abstract class ApkActionsBuilder with two implementations, one for default signing/zipaligning and one for ApkSignerTool based signing/zipaligning. In addition to build the action for constructing the APK, it now responsible for orchestrating the various tools to build, sign and zipalign the APK. -- MOS_MIGRATED_REVID=131889338
* Spam lib/rules/android with @AutoValue. Mostly created byGravatar Googler2016-09-01
| | | | | -- MOS_MIGRATED_REVID=131832497
* Rollback of commit 8dc4257b9493bd2251636de1271a1972c17919ef.Gravatar Tobias Werth2016-08-30
| | | | | -- MOS_MIGRATED_REVID=131692718
* Hook up split-up resource processing tools for android_libraryGravatar Googler2016-08-30
| | | | | | | | | | Behind a flag. Flow is: parse -> merge -> validate \--> compile With fewer deps across the merge steps. -- MOS_MIGRATED_REVID=131634115
* 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
* Avoid building android R class ijar / header jarGravatar Googler2016-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | It is already ignored and the real jar used as the compileTime jar in AndroidCommon. It's only used by the ide-resolve output group. The real jar is pretty close to the header jar in terms of content (field inits deleted). Tradeoff: The real jar is ~33% bigger (w/ same compression level), vs save build time and space by skipping the hjar actions and artifacts. At android_binary level, the hjar action can take ~40 seconds in some cases. At the library level, the hjar time is pretty tiny. hjars are not compressed. We could compress the real jars to make up for the extra 30% size (and beat the hjar size), but that adds ~25% elapsed time to do the compression (e.g., 10s vs 7.5s). Compression can shrink the jar 2-3x (37MB vs 100MB). -- MOS_MIGRATED_REVID=131588283
* --Gravatar Googler2016-08-29
| | | | MOS_MIGRATED_REVID=131464027
* Exclude resources jars from android_library rules from the apk_manifestGravatar Alex Humesky2016-08-27
| | | | | | | because they contain useless stub ids. -- MOS_MIGRATED_REVID=131449999
* Don't provide AARs for deps that are neverlink or that of their transitiveGravatar Googler2016-08-27
| | | | | | | dependencies. -- MOS_MIGRATED_REVID=131434655
* Add two implicit outputs to the AndroidBinary rule that are produced by ↵Gravatar Googler2016-08-26
| | | | | | | | | | ProGuard: - The list of dead code in the input class files (-printusage). - The list of classes and class members matched by the various '-keep' options (-printseeds). -- MOS_MIGRATED_REVID=131414162
* Rollback of commit b5ac354867c4d8deb543285e87e636504078fb69.Gravatar Michael Staib2016-08-25
| | | | | | | | | *** Reason for rollback *** Roll forward with fixes. -- MOS_MIGRATED_REVID=131224077
* Remove SourcesJavaCompilationArgsProviderGravatar Liam Miller-Cushon2016-08-17
| | | | | -- MOS_MIGRATED_REVID=130469884
* Allow Skyframe graph lookups and value retrievals to throw InterruptedException.Gravatar Janak Ramakrishnan2016-08-16
| | | | | | | The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer. -- MOS_MIGRATED_REVID=130327770
* Issue deprecation warnings for deprecated code paths.Gravatar Googler2016-08-16
| | | | | -- MOS_MIGRATED_REVID=130326607
* Use processed instead of merged manifest in android deploy infoGravatar Googler2016-08-12
| | | | | | | | | | The processed manifest has applicationId subbing while the merged one is before substitution (if the developer hasn't migrated to the new gradle- style manifest merger). -- MOS_MIGRATED_REVID=130046777
* Add android_test#data to android deploy info.Gravatar Googler2016-08-12
| | | | | -- MOS_MIGRATED_REVID=130016248
* Add the repository name as a parameter to the output path functionsGravatar Kristina Chodorow2016-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't do anything yet, it's in preparation for the execroot rearranging change. The execroot will have one bazel-out per repo, so it'll look like: execroot/ repo1/ bazel-out/ local-fastbuild/ bin/ repo2/ bazel-out/ local-fastbuild/ bin/ genfiles/ repo3/ bazel-out/ local-fastbuild/ testlogs/ and so on. Thus, any output path (getBinDirectory() & friends) needs to know what the repo name is. This changes so many places in the code I thought it would be good to do separately, then just flip the functionality in the execroot-rearranging commit. While I was poking around, I changed all of the refs I could from getPackageRelativeArtifact() to getBin/GenfilesArtifact(), so that 1) rule implementation don't have to know as much about roots and 2) they'll be more isolated from other output dir changes. `bazel info` and similar just return roots for the main repository. The only "change" is passing around a target label in the Java rules. Continues work on #1262. -- MOS_MIGRATED_REVID=129985336
* The Android transition requires a valid CPU value. If we don't have one, ↵Gravatar Googler2016-08-11
| | | | | | | | | don't do the split. RELNOTES: Disable the Android split transition if --android_cpu and fat_apk_cpu are both empty. -- MOS_MIGRATED_REVID=129931354
* Sets SONAME on shared objects in Android binaries.Gravatar Adam Michael2016-08-11
| | | | | | | | | | | | | | | Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for SDK 24 and removes the warnings for previous SDKs. There is no need to set the linker flag for android_librarys that depend on native code, because the linker flag will be set by the android_binarys that depend on that android_library. Testing is done via `readelf` executable that is shipped with the NDK. -- Change-Id: I16fdfe6522c8694ce51554289122bf035a61d9ec Reviewed-on: https://bazel-review.googlesource.com/#/c/4302/ MOS_MIGRATED_REVID=129920256
* Fix handling of jdeps files in android_* rulesGravatar Liam Miller-Cushon2016-08-08
| | | | | | | | | | If header compilation is enabled, the compile-time dependency information is produced by the header compilation action. The android rules were incorrectly using the dependency information from the regular compilation, which defeated the critical path improvement from header compilation. -- MOS_MIGRATED_REVID=129505189
* Short-circuit runfiles tree creation if runfiles are disabled (for example, ↵Gravatar Lukacs Berki2016-08-04
| | | | | | | on Windows by default) -- MOS_MIGRATED_REVID=129319018
* Remove reference to android_tool_runner.Gravatar Googler2016-08-03
| | | | | | | We actually don't need it. -- MOS_MIGRATED_REVID=129149261
* Rollback of commit 49dfc29a40764ae48f2343007f88f3a4938498f1.Gravatar Yun Peng2016-08-02
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** This change causes android_integration_test failing on Mac. *** Original change description *** Sets SONAME on shared objects in Android binaries. Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for SDK 24 and removes the warnings for previous SDKs. There is no need to set the linker flag for android_librarys that depend on native code, because the linker flag will be set by the android_binarys that depend on that android_library. -- MOS_MIGRATED_REVID=129074607
* Sets SONAME on shared objects in Android binaries.Gravatar Adam Michael2016-08-01
| | | | | | | | | | | | | Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for SDK 24 and removes the warnings for previous SDKs. There is no need to set the linker flag for android_librarys that depend on native code, because the linker flag will be set by the android_binarys that depend on that android_library. -- Change-Id: If6422f2c2677ec974a3682e3038d7fe159ed4978 Reviewed-on: https://bazel-review.googlesource.com/#/c/4210/ MOS_MIGRATED_REVID=128833820
* Replace calls to SpawnAction$Builder#addInputs(NestedSet) with ↵Gravatar Liam Miller-Cushon2016-07-29
| | | | | | | addTransitiveInputs -- MOS_MIGRATED_REVID=128820723
* Lift out the ResourceContainer -> arg/artifact functionsGravatar Googler2016-07-29
| | | | | | | | This way they can be shared with a resource merge spawn action builder (similar cmdline conventions). -- MOS_MIGRATED_REVID=128804575
* Revert "Sets SONAME on shared objects in Android binaries."Gravatar Damien Martin-Guillerez2016-07-29
| | | | | | | | This reverts commit e65876a28965c72f7a48a16be3390ba7c5c97a6f. This commit have not gone through the proper workflow. Fixes #1582.
* 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
* Rename some PackageId and RepositoryName fields/methods in prep for deep ↵Gravatar Kristina Chodorow2016-07-28
| | | | | | | | | | | | | execroot change This is in prep for making the execution root path for external repositories ../repo_name (instead of external/repo_name). Right now, the getRunfilesPath() returns that path, so that is renamed getExecRoot() (since the runfiles are really just a reflection of the execRoot structure). getSourceRoot() replaces getPathFragment, which has always been a confusing name (it's not clear from the name what the difference is between it and getPackageFragment()). It returns the relative path to source files for external repositories (external/repo_name). Also renamed/moved to more sensible class a few static RepositoryName fields. -- MOS_MIGRATED_REVID=128594419
* Remove experimental_use_proguard_previous_obfuscation_map flag. This was ↵Gravatar Googler2016-07-28
| | | | | | | removed from the global blazerc in unknown commit. -- MOS_MIGRATED_REVID=128591745
* Sets SONAME on shared objects in Android binaries.Gravatar Adam2016-07-28
| | | | | | | | | | Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for SDK 24 and removes the warnings for previous SDKs. There is no need to set the linker flag for android_librarys that depend on native code, because the linker flag will be set by the android_binarys that depend on that android_library. Change-Id: I0d4fd78ffaf03c19ae3712bdeb28a52722a22f6f
* Change android resource shrinking to use the standard Proguard jar artifact.Gravatar Andrew Pellegrini2016-07-27
| | | | | | | | * Re-add proguard mapping file handling to ResourceShrinker to handle the fully Proguarded code, potentially including an obfuscation step. * Update android_binary to provide the resource shrinker with the standard Proguard jar and obfuscation mapping instead of a custom built shrunk jar. -- MOS_MIGRATED_REVID=128476602
* Moves exports_manifest attribute to AndroidLibraryBaseRule instead ofGravatar Googler2016-07-27
| | | | | | | | | | AndroidResourceSupportRule. This removes the exports_manifest attribute from AndroidBinaryBaseRule and its children. RELNOTES: Removes exports_manifest attribute from android_binary rule. -- MOS_MIGRATED_REVID=128472120
* RELNOTES: Improve Android split transition handling.Gravatar Googler2016-07-22
| | | | | -- MOS_MIGRATED_REVID=128184440
* Add target names for mergee manifests to generate more helpful error ↵Gravatar Andrew Pellegrini2016-07-20
| | | | | | | messages from manifest merging when using manifest_merger="android" on android_binary rules. -- MOS_MIGRATED_REVID=127962630
* Plumb customPackage to RClassGenerator and skip empty R classesGravatar Googler2016-07-20
| | | | | | | | | | | | | Forgot to do this, so we get compiler errors since it can't find the R class imported under the requested custom java package. Also, avoid writing out the top-level R.class file if there are no symbols. There is a test that happens to check for this. -- MOS_MIGRATED_REVID=127888913
* Rollback of commit 270f59b3630ef009f4a3e973581b3fc65a24ecc9.Gravatar Michael Staib2016-07-14
| | | | | | | | | | | | | *** Reason for rollback *** Broke Android targets with native code when cpu is explicitly set. *** Original change description *** RELNOTES: Improve Android split transition handling. -- MOS_MIGRATED_REVID=127377943
* RELNOTES: Improve Android split transition handling.Gravatar Googler2016-07-12
| | | | | -- MOS_MIGRATED_REVID=127099896
* --Gravatar Googler2016-07-12
| | | | MOS_MIGRATED_REVID=127091947
* Use fast-path compiler for android_binary R.classesGravatar Googler2016-07-11
| | | | | | | | | | | | | Hook up the RClassGeneratorAction to blaze code. This is currently only used for android_binary targets to build the final R classes of the binary + all of its libraries. Behind a flag and off by default (flip on later). -- MOS_MIGRATED_REVID=126935165
* 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
* --Gravatar Carmi Grushko2016-07-07
| | | | MOS_MIGRATED_REVID=126723341
* Rollback of commit 588a6a04c748a02f583d552660434d74190bb3ba.Gravatar Florian Weikert2016-07-04
| | | | | | | | | *** Reason for rollback *** Broke some targets -- MOS_MIGRATED_REVID=126574275
* Add output log for android resource shrinking, following the format produced ↵Gravatar Andrew Pellegrini2016-07-04
| | | | | | | by the Gradle resource shrinker in resources.txt. -- MOS_MIGRATED_REVID=126420534