aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/ApkActionsBuilder.java
Commit message (Collapse)AuthorAge
* Makes ApkActionsBuilder honor --nobuild_runfile_manifests.Gravatar shahan2018-04-18
| | | | PiperOrigin-RevId: 193422658
* Move all code to lookup JavaRuntimeInfo to static methods onGravatar John Cater2018-01-23
| | | | | | | JavaRuntimeInfo. Change-Id: Ic338dc9b3e5efa2fee92dba722a46cab743db40c PiperOrigin-RevId: 182919931
* Automatic formatting cleanup of Android *.java files.Gravatar jingwen2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179425421
* Convert JavaToolchainProvider to a concrete class, and a subclass of ↵Gravatar jcater2017-11-17
| | | | | | ToolchainInfo. PiperOrigin-RevId: 176117866
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Make it an error to attempt to expand an attribute that does not existGravatar ulfjack2017-10-11
| | | | PiperOrigin-RevId: 171684595
* PiperOrigin-RevId: 170539405Gravatar Googler2017-10-02
|
* Move expansion functionality to a new classGravatar ulfjack2017-09-29
| | | | | | Progress on #2475. PiperOrigin-RevId: 170473111
* Support multiple command lines / params files in SpawnAction.Gravatar tomlu2017-09-15
| | | | | | This is necessary for the upcoming Skylark implementation of param files. PiperOrigin-RevId: 168744486
* Make --experimental_android_use_nocompress_extensions_on_apk a no-op.Gravatar ajmichael2017-09-08
| | | | | | RELNOTES: android_binary.nocompress_extensions now applies to all files in the APK, not just resources and assets. PiperOrigin-RevId: 167859686
* Adds -p to zipalign invocation to align stored (not compressed) .so files in ↵Gravatar ahumesky2017-08-25
| | | | | | | apks on memory page boundaries. RELNOTES: .so files in APKs will be memory-page aligned when android_binary.nocompress_extensions contains ".so" and --experimental_android_use_nocompress_extensions_on_apk is specified. PiperOrigin-RevId: 166399337
* Use CustomCommandLine directly instead of via SpawnAction.Builder.Gravatar tomlu2017-08-23
| | | | | | | | | | | | | This change forces use of CustomCommandLine.Builder, which has a richer interface for constructing memory-efficient command lines. It will also permit surveying the code base for inefficient patterns using an IDE. This change was done by hand and split using Rosie to assist with rollbacks in case of bugs. Reviewers, please pay particular attention to: * Each all to addInputArgument/addOutputArgument should come with a corresponding matching pair to SpawnAction.Builder#addInput and CustomCommandLine.Builder#addExecPath (eg.). * The commandLine must be set on the SpawnAction using SpawnAction.Builder#setCommandLine. Note that most calls to addPrefixed("arg=", val) should be more idiomatically expressed as add("arg", val), but this involves changing tests and making sure that the command line tools can accept the format. PiperOrigin-RevId: 166076054
* Use @CompileTimeConstant on SpawnAction.Builder#setProgressMessage.Gravatar tomlu2017-08-04
| | | | | | | | | Add SpawnAction.Builder#setProgressMessageNonLazy for dynamic strings. This should help guide users to the right method. This also helped find a few methods I'd missed previously that could use a constant-string version. RELNOTES: None PiperOrigin-RevId: 164150264
* Compute progress message lazily in spawn action.Gravatar tomlu2017-08-03
| | | | | | | | | | Consumers using spawn action builder now have access to handy overloads that behind the scene do a lazy String.format. In 95% of cases progress messages are expressible as 0, 1, or 2 argument String.formats. This saves memory because the format string is constant and shared between all actions, and the captured subjects are usually live on the heap anyway (eg. labels). Skylark still computes its progress messages eagerly. If we want similar savings there I'd have to follow up with a Skylark proposal. PiperOrigin-RevId: 164068816
* Remove all non-essential call sites of methods on Jvm.Gravatar lberki2017-07-07
| | | | | | | This is so that we can eventually route the information it now contains through JavaRuntimeProvider. RELNOTES: None. PiperOrigin-RevId: 161196809
* Remove resource_extractor from android_sdk rule.Gravatar ajmichael2017-06-29
| | | | | | | | | | resource_extractor has nothing to do with the Android SDK. Once upon a time, it was needed for jack support, so it was colocated with the jack attributes in android_sdk. Nowadays, it is used as a necessary step before singlejar can run to build the APK. RELNOTES: None PiperOrigin-RevId: 160479247
* Cleanup the interface of ApkActionsBuilder.Gravatar ajmichael2017-06-05
| | | | | | | | | | | | | | | A few changes: 1. Remove the ApkSigningMethod input. We always read this from AndroidConfiguration, callers shouldn't need to pass it in. 2. Add a signingKey attribute. This will be needed for dex2oat to pass in whatever key was used to sign the input APKs. 3. Unify the resourceApk and nativeLibsZips into a "addInputZip(s)" methods. This can also be used for inputting an existing APK, such as the one from dex2oat. RELNOTES: None PiperOrigin-RevId: 157973679
* Remove "supports-workers" tag from ApkBuilder execution info.Gravatar philwo2017-06-05
| | | | | | The C++ implementation of SingleJar, which is available in Bazel, but not yet the default, doesn't support persistent worker mode, so this causes issues when you try to use it. PiperOrigin-RevId: 157831362
* RELNOTES: NoneGravatar ajmichael2017-04-19
| | | | PiperOrigin-RevId: 153545346
* Add flag to compress all Java resources before bundling them into the APK.Gravatar ajmichael2017-04-03
| | | | | | | RELNOTES: Add --experimental_android_compress_java_resources flag to store java resources as compressed inside the APK. PiperOrigin-RevId: 151825809
* Remove support for --apk_signing_method=legacy_v1.Gravatar Adam Michael2017-03-16
| | | | | | | | The default has been v1 since late October. -- PiperOrigin-RevId: 150250180 MOS_MIGRATED_REVID=150250180
* Make mobile-install work with --use_singlejar_apkbuilder.Gravatar Adam Michael2017-03-14
| | | | | | | | | | | All .dex files to include in the APK must now either be in a zip file or be named "classes.dex". Now with test coverage! -- PiperOrigin-RevId: 150074347 MOS_MIGRATED_REVID=150074347
* Switch to RunfilesSuppliers for communicating runfilesGravatar Michajlo Matijkiw2017-01-30
| | | | | | | | | | | | | | | | | | | | | | | ActionSpawn/SpawnAction now deal exclusively in RunfilesSuppliers, manifests maps are no more. There is some lingering awkwardness, in particular: - Manifests still need to be tracked in some places, we can work out if this is still necessary on a case by case basis. - Skylark makes actions' runfiles available via 'resolve_command' where they are consumed by 'action'. I've updated the documentation, though the name isn't entirely accurate anymore. That being said these interfaces _are_ marked as experimental, so we _should_ be able to be flexible here. Overall, I think the benefits consolidating runfiles into suppliers, from both code cleanliness and performance perspectives (no longer needing to parse manifests), outweights the awkwardnesses. RELNOTES: resolve_command/action's input_manifest return/parameter is now list -- PiperOrigin-RevId: 145817429 MOS_MIGRATED_REVID=145817429
* Normalize timestamps inside of APKs built with SingleJar.Gravatar Adam Michael2016-11-16
| | | | | -- MOS_MIGRATED_REVID=139265482
* Singlejar apkbuilder now puts resources in the correct location in APK.Gravatar Adam Michael2016-10-28
| | | | | | | This was a bug that only affected builds with a single classes.dex. -- MOS_MIGRATED_REVID=137427786
* 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
* Adds SingleJar APK building option behind --use_singlejar_apkbuilder flag.Gravatar Adam Michael2016-10-04
| | | | | | | | | Default is off (using ApkBuilderMain still). Note that --use_singlejar_apkbuilder is incompatible with --apk_signing_method=legacy_v1 (but compatible with --apk_signing_method={v1,v2,v1_v2}). -- MOS_MIGRATED_REVID=134783504
* Fix progress message for apksigner.Gravatar Adam Michael2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132088164
* 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