| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dynamically Configured Resource Filtering change 2/6
We need to filter LocalResourceContainer for dynamically configured resource
filtering - it is an input to resource parsing for android_library targets.
Filter it appropriately.
Once it's being filtered, use it to build a filtered ResourceContainer, rather
than building an unfiltered ResourceContainer and then filtering it. This means
filtering gets done sooner, saving a bit of time and work, and isn't done
twice, which would just be bad.
To do this, we pass an unbuilt ResourceContainer.Builder into createApk, rather than a fully built one. Move the setAssetsAndResourcesFrom and setManifest calls to that builder, called every time, into createApk so that we only call them once.
Also, initialize the ResourceFilter object when it's needed, rather than pass
it down from the binary or library. This makes the code a bit cleaner, plus
means library targets will pick up the dynamically configured information once
that exists.
RELNOTES: none
PiperOrigin-RevId: 162007885
|
|
|
|
| |
PiperOrigin-RevId: 161910195
|
|
|
|
| |
PiperOrigin-RevId: 161563102
|
|
|
|
|
|
|
| |
This is so that we can eventually route the information it now contains through JavaRuntimeProvider.
RELNOTES: None.
PiperOrigin-RevId: 161196809
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 161086496
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks tests in current Blaze nightlies, see b/63296317
*** Original change description ***
Add minSdkVersion optimization to Blaze.
This optimization reduces the size of Android apps that use Proguard by ~0.2 - 0.3% depending on the minSdkVersion.
RELNOTES: None.
PiperOrigin-RevId: 160930942
|
|
|
|
|
|
|
| |
This optimization reduces the size of Android apps that use Proguard by ~0.2 - 0.3% depending on the minSdkVersion.
RELNOTES: None.
PiperOrigin-RevId: 160673030
|
|
|
|
|
|
|
| |
With a few manual fixes for readability.
RELNOTES: None.
PiperOrigin-RevId: 160582556
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* Split the aar, library and binary packWith calls.
* Remove unused argument from the new binary and library packWith calls.
RELNOTES: None
PiperOrigin-RevId: 160414867
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 159460633
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
The only call site passes single artifacts. Some of the read sites assert that
the NestedSet contains only one element.
RELNOTES: None
PiperOrigin-RevId: 157635897
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 156770067
|
|
|
|
|
|
|
| |
no-op, and default behavior to on since it has been on in the global blazerc for awhile now.
RELNOTES: Deprecate use_singlejar_for_proguard_libraryjars and force behavior to always on.
PiperOrigin-RevId: 154890445
|
|
|
|
|
|
|
| |
Also remove the $zip attribute of android_binary and android_test.
RELNOTES: --experimental_android_use_singlejar_for_multidex is now a no-op and will eventually be removed.
PiperOrigin-RevId: 154111305
|
|
|
|
|
| |
RELNOTES: none
PiperOrigin-RevId: 153223511
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
android_binary targets have their own R.java files (built from merging
dependencies and any resources that belong directly to the target). As such,
they don't need inherited R.java files at runtime. Taking these out makes for
smaller APKs and less inheritance from the target's dependencies.
Add a flag to control this behavior. Have it default to continue to include
R.class files as runtime dependencies so we can control rollout of this
behavior.
Add tests of android_binary to ensure the JAR is filtered out as appropriate,
and of android_robolectrictest to ensure that those tests still have access to
the JARs.
RELNOTES: none
PiperOrigin-RevId: 153177074
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first actual user of the config_feature_flag rule, able to actually
set its value (and thus give a point to using it!)
This feature is not fully launched yet, but it is usable in any build
containing this change.
RELNOTES: None.
PiperOrigin-RevId: 152948153
|
|
|
|
|
|
|
|
| |
tool during incremental dexing
RELNOTES: none
PiperOrigin-RevId: 152838197
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 152523635
|
|
|
|
|
|
|
| |
All android_sdk rules are required to have the apksigner binary, which was not included in the build tools until version 24.0.3. So this check is no longer necessary. Instead, we check in AndroidSdkRepositoryFunction.
RELNOTES: None
PiperOrigin-RevId: 152498753
|
|
|
|
|
|
|
|
|
| |
Closes https://github.com/bazelbuild/bazel/issues/1391.
RELNOTES: Removed --experimental_use_jack_for_dexing and libname.jack output of
android_library.
PiperOrigin-RevId: 152131075
|
|
|
|
|
|
|
|
|
|
| |
as argument.
This is needed because which proguard map that gets added as an argument to mainDexListAction depends on whether or not Rex is enabled
RELNOTES: None
PiperOrigin-RevId: 151720305
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 151407958
MOS_MIGRATED_REVID=151407958
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 151170448
MOS_MIGRATED_REVID=151170448
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rollback of commit df366408188f0451bae9b2ed079c795a4beb2e2b.
In addition to undoing the rollback of my previous change, fix the bugs it
introduced and add tests for those bugs.
Always ignore empty filters. Empty filters are always useless or
counterproductive. Before the original change, empty filters as a single item
within the list of filters (e.g., ["en", ""]) were ignored, but empty filters
as a portion of a string in the list (e.g., ["en,"]) were not. I can't imagine
any reason people would actually want the empty filter (if it were handled
correctly, it would effectively tell Bazel to just ignore every other filter
the user passed in).
Since it makes more sense with the new code, represent the stringified filters
as a list of strings, rather than a single string of comma-seperated values.
Manually trim whitespace from each token. Before the original change, the code
trimmed whitespace following commas (e.g., ["en, es"] -> ["en,es"]) but not
otherwise. If we're allowing whitespace in filter strings anyway, there doesn't
seem to be any reason to allow it in some places but not others.
--
PiperOrigin-RevId: 151128685
MOS_MIGRATED_REVID=151128685
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 151000602
MOS_MIGRATED_REVID=151000602
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In addition to filtering android_binary resources by
resource_configuration_filters, we also filter by densities. Doing this in
analysis rather than execution should also result in a speed-up as there's no
need to copy files unwanted for actions to use.
This behavior is controlled by the same object and flags that already
control resource configuration filtering, simplifying the code.
--
PiperOrigin-RevId: 150871620
MOS_MIGRATED_REVID=150871620
|
|
|
|
|
|
|
|
| |
android_binary rules whose .apk artifacts get piped through appt to support split apks
--
PiperOrigin-RevId: 150701976
MOS_MIGRATED_REVID=150701976
|
|
|
|
|
|
|
|
|
|
| |
These libraries don't produce data binding outputs on resource processing (since
there's nothing to process). Their only role is to pass through the outputs of
their deps.
--
PiperOrigin-RevId: 150251921
MOS_MIGRATED_REVID=150251921
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 149652245
MOS_MIGRATED_REVID=149652245
|
|
|
|
|
| |
PiperOrigin-RevId: 148938713
MOS_MIGRATED_REVID=148938713
|
|
|
|
|
|
|
|
| |
out if DexArchiveAspect misses .jar files
--
PiperOrigin-RevId: 148835665
MOS_MIGRATED_REVID=148835665
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 148388306
MOS_MIGRATED_REVID=148388306
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, resource_configuration_filters were only used to filter
resources out of android_binary targets during resource processing. Instead, we
can filter these unwanted resources out during analysis. This means we won't
have to copy these resources for use in execution, and that execution itself
will have a smaller set of inputs. This should produce a speed-up in
android_binary targets with resource_configuration_filters.
Also add a flag that controls this behavior. Currently, the flag defaults to
not doing this prefiltering. We'll change that after further testing.
Also, do some related cleanup:
- Replace repeated used of the constant "resource_configuration_filters" with
references to the new class
- Pass around instances of the new class rather that List<String> objects meant
to represent ResourceConfigurationFilters
--
PiperOrigin-RevId: 148353501
MOS_MIGRATED_REVID=148353501
|
|
|
|
|
|
|
|
|
|
| |
targets when both resource shrinking and Proguard are enabled, as it is required by resource shrinking to work properly.
RELNOTES: Automatically generate Proguard mapping when resource shrinking and Proguard are enabled.
--
PiperOrigin-RevId: 148349205
MOS_MIGRATED_REVID=148349205
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 145495392
MOS_MIGRATED_REVID=145495392
|
|
|
|
|
|
|
|
| |
performed in order to expose it in build summary output.
--
PiperOrigin-RevId: 145457357
MOS_MIGRATED_REVID=145457357
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 143823562
MOS_MIGRATED_REVID=143823562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All calls now go through RuleContext.attributes(), which
guarantees both native and aspect-supplied attributes are checked.
For aspect attributes, only type queries are supported (e.g. "does
this attribute exist?", "what is its type?"). Not value queries.
This is because the code this is cleaning up accesses aspect
attributes through a String->Attribute map, which doesn't include
values. If ever needed we could further extend with something
more robust.
--
MOS_MIGRATED_REVID=140771242
|
|
|
|
|
|
|
| |
Currently, setting this flag on a native multidex build results in classes*.dex being stored in the APK uncompressed which is certainly not good.
--
MOS_MIGRATED_REVID=140561305
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is not yet exposed at the user level.
(https://developer.android.com/topic/libraries/data-binding/index.html).
See comments in DataBinding.java for the high-level overview of
how this works.
This does not yet work with
--experimental_use_parallel_android_resource_processing.
Exposing this at the user level additionally requires:
1) making the data binding support libraries available at an
expected place in the depot
2) Opting in android_binary / android_library rules through a new
"enable_data_binding" attribute.
--
MOS_MIGRATED_REVID=139797558
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=138695951
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=137886595
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=137877037
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
To roll this out safely, this is hidden behind a flag: --experimental_android_use_singlejar_for_multidex
See https://github.com/bazelbuild/bazel/issues/1936
--
MOS_MIGRATED_REVID=137155214
|
|
|
|
|
|
|
|
|
| |
a per-target basis. This flag only affects builds that have --experimental_android_resource_shrinking enabled. This will allow us to enable and disable the feature without needing to update [] or Rapid configs and on a module by module basis inside GmsCore. It will also let us enable/disable for GmsCore modules on a team by team basis.
Tested by adding to an android_binary target and building with the resource shrinking flag enabled.
--
MOS_MIGRATED_REVID=136189212
|