| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
| |
from a list of paths to a dictionary of paths and manifest names.
--
MOS_MIGRATED_REVID=129987988
|
|
|
|
|
|
|
|
|
|
|
| |
declaration from the generated manifest if the list of requested densities contains an unsupported density.
Typically, the DensitySpecificManifestProcessor will add a <compatible-screens> declaration with a <screen> element for every density specified in the "densities=" argument of the android_binary build rule. If the "densities=" argument includes a density not officially supported by the Play Store, it will throw an exception and the build will fail.
After this change, an build rule that explicitly specifies a density not officially supported by the Play Store will instead result in the <compatible-screens> declaration being omitted from the generated manifest, indicating that the APK can support all densities.
--
MOS_MIGRATED_REVID=129761968
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
The Play Store serving team doesn't want to add support for any new density buckets, so I'm going to roll this back for now (this CL allows us to build an APK declaring 340, but the APK can't be pushed to the Play Store, so not very useful). I can roll forward again in the unlikely event that the Play Store folks change their mind.
I will investigate some other build solution for getting an APK into the play store that can be offered to devices declaring 340 dpi.
*** Original change description ***
Adds support for round and 340dpi to resource qualifiers, and allows stamping 340dpi into the density filtered manifest.
Also adds 340dpi to the list of supported Android Wear densities.
340dpi is the density declared by Nemo and Swordfish, and the Play Store will not offer APKs to those devices unless they include <compatible-screens> entries with this density.
--
MOS_MIGRATED_REVID=129354693
|
|
|
|
|
|
|
|
|
|
|
| |
stamping 340dpi into the density filtered manifest.
Also adds 340dpi to the list of supported Android Wear densities.
340dpi is the density declared by Nemo and Swordfish, and the Play Store will not offer APKs to those devices unless they include <compatible-screens> entries with this density.
--
MOS_MIGRATED_REVID=129117839
|
|
|
|
|
|
|
|
| |
Similar to the value xml errors. Otherwise it's
not clear what file to look at =)
--
MOS_MIGRATED_REVID=129094207
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128992760
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The binary's R.txt might not be superset of
symbols in the various library R.txt files.
The R.java writer had tolerated this, as did an
older version of the RClassGen (lost in refactoring).
Bring back the null check.
This can happen if the binary has res overrides that
*remove* symbols. E.g., if noop/res/layout/stats.xml
overrides dev/.../stats.xml, and the noop version
removes elements not needed for production.
Test mocks can do something similar.
--
MOS_MIGRATED_REVID=128989080
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128729088
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Address the TODO about using toString in the
TreeMap comparator by using DataKey#compareTo.
Also, use the entrySet to iterate K-V pairs
instead of calling get(key).
Synthetic benchmark w/ 10000 random keys:
Before: 260ms to serialize
After: 33ms to serialize
Less of a difference when there are few keys.
--
MOS_MIGRATED_REVID=128469407
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128401550
|
|
|
|
|
|
|
|
|
|
|
| |
The new merger doesn't use addToResourceSet(),
modify(), etc.
Also, since modify() is unused, remove the DirectoryModifier
objects and reduce BUILD deps.
--
MOS_MIGRATED_REVID=128387448
|
|
|
|
|
|
|
|
|
|
| |
Recently, a new java test is added into Bazel, but failing on Windows because using the wrong path separator.
This change fixs it.
--
Change-Id: Ib73abac9c22b1d21180f76c13358a1173fde863c
Reviewed-on: https://bazel-review.googlesource.com/#/c/4131
MOS_MIGRATED_REVID=128331068
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128202272
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collects the R class fields from the new merger's
internal state, and then writes out either an
R.java or R.class. TBD which to use. One concern
is that users may want the javadoc. If so,
perhaps this could generate the R.class, and
then aapt could generate the srcjar off of the
build critical path.
Refactor the RClassGenerator to make it easier to
use from merger state (vs from R.txt).
--
MOS_MIGRATED_REVID=128181306
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128074515
|
|
|
|
|
|
|
|
| |
* Account for the dataKey in MergeConflicts (whoops.)
* When finding a conflict, always take the last value -- this matches the current merger strategy.
--
MOS_MIGRATED_REVID=127980673
|
|
|
|
|
|
|
| |
messages from manifest merging when using manifest_merger="android" on android_binary rules.
--
MOS_MIGRATED_REVID=127962630
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This has been a no-op since commit 9a21e20ab55dad018caee765d67be528fa84caf0.
--
MOS_MIGRATED_REVID=127771957
|
|
|
|
|
|
|
|
|
|
|
| |
* Reduces the size of merged values.xml
* Improves correctness of merged xml
Sadly, this is also backwards compatible by allowing multiple definitions of a prefix with different namespaces.
Will be cleaned up after transition.
--
MOS_MIGRATED_REVID=127481147
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=127466889
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks Bazel's CI because the current release (0.3.0) is used to query some targets, which doesn't have java_proto_library yet.
*** Original change description ***
Use the native java_proto_library instead of the macro defined in genproto.bzl.
--
MOS_MIGRATED_REVID=127431334
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=127324151
|
|
|
|
|
|
|
| |
* Add attributes to PluralXmlResourceValue
--
MOS_MIGRATED_REVID=127147486
|
|
|
|
|
|
|
|
| |
Properly handle unary tags in AttrXmlResourceValue
Handle CData for string content.
--
MOS_MIGRATED_REVID=127118005
|
|
|
|
|
|
|
| |
Mergee manifests are pre-processed and written to a temp directory, based on their original path, before the final merge. Previously only the filename was used, resulting in each mergee overwriting the previous, all of which were <temp_dir>/AndroidManifest.xml. Using the full path of each manifest ensures this overwriting cannot occur.
--
MOS_MIGRATED_REVID=126942789
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The --splits flag is now --split, since I remembered about how allowMultiple exists.
More importantly, split APKs are now correctly moved to filenames which are fairly
trivially constructed from the input split flags, allowing Bazel to just do a simple
one-character replace on the split flags and know what files the resource processing
action is going to output.
One more step in the quest for world domination, or rather, split APKs for resources.
Next: Actually supporting this in android_binary.
--
MOS_MIGRATED_REVID=126838431
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the end, foo.9.png should result in an R.java
field R.drawable.foo (not R.drawable.foo_9).
Also, given foo.9.png and foo.png, aapt will give
an error:
res/drawable/foo.png:0: error: Resource entry foo is already defined.
res/drawable/foo.9.png:0: Originally defined here.
So it seems like we should generate a merge
conflict warning as well. Adjust FQN accordingly.
--
MOS_MIGRATED_REVID=126693820
|
|
|
|
|
|
|
|
|
| |
The test was failing because IdlClass can't handle file path with back-slash
--
Change-Id: Ica72da756fd4bd9b4f8d907ff795549a59edc8be
Reviewed-on: https://bazel-review.googlesource.com/#/c/3966
MOS_MIGRATED_REVID=126636692
|
|
|
|
|
|
|
| |
by the Gradle resource shrinker in resources.txt.
--
MOS_MIGRATED_REVID=126420534
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To be used by a later CL where we use this more
complete picture of all the resource items to
generate our own R.java/class without invoking
AAPT (and split out AAPT to a separate action
that is off the java builder critical path).
Technically aapt creates R.id.foo for attr
<enum name="foo" ... /> and flag as well, but
I haven't seen code that actually relies on that.
Currently off-by-default (only exercised by tests).
--
MOS_MIGRATED_REVID=126407838
|
|
|
|
|
|
|
| |
* Add in some line breaks for easier to read output.
--
MOS_MIGRATED_REVID=126315204
|
|
|
|
|
|
|
|
|
| |
is necessary for <style parent="">.
The previous code omitted empty strings to avoid the <attr format=""> case which is an error for aapt.
--
MOS_MIGRATED_REVID=126305040
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=126200568
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new "define" method replaces the now deprecated writeToValuesXml method. This provides three benefits:
* An agnostic writing interface to the XmlResourceValue classes, easing the replacement of them with a proper xml writer.
* A delayed write which allows the StyleableXmlResourceValue to claim AttrXmlResourceValue definitions before writing.
* Centralized method of source attribution, enabling a less verbose way to indicate multiple values came from a single xml source file.
An example of the new interface writing the StyleXmlResourceValue:
ValuesResourceDefinition definition = mergedDataWriter
.define(key)
.derivedFrom(source)
.startTag("style")
.named(key)
.optional()
.attribute("parent")
.setTo(parent)
.closeTag();
for (Entry<String, String> entry : values.entrySet()) {
definition = definition
.startItemTag()
.named(entry.getKey())
.close()
.addCharactersOf(entry.getValue())
.endTag();
}
definition.endTag().save();
--
MOS_MIGRATED_REVID=126196028
|
|
|
|
|
|
|
| |
the functional equality, the definition type of the attribute has direct impact on the order in which the attribute appears in the styleable array.
--
MOS_MIGRATED_REVID=126126122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newly passing:
//src/test/java/com/google/devtools/build/...
android/ideinfo:PackageParserTest
android/ideinfo:ArtifactLocationConverterTest
android:AndroidResourceCompilationActionTest
lib:ideinfo_test
--
Change-Id: If035533f3c238489d9791bac9ca49143b84b06df
Reviewed-on: https://bazel-review.googlesource.com/#/c/3913
MOS_MIGRATED_REVID=126072874
|
|
|
|
|
|
|
| |
RELNOTES:None
--
MOS_MIGRATED_REVID=125989427
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
This breaks the Bazel build because "putMappedXmlValue" does not exist.
See: http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=linux-x86_64/616/console
--
MOS_MIGRATED_REVID=125671091
|
|
|
|
|
|
|
|
|
| |
the BufferedReader.
Add the errors a suppressed exceptions which is more useful for debugging.
--
MOS_MIGRATED_REVID=125609925
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=125574484
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
write R classes directly
NEW: add check that primary R.txt exists before
trying to load its symbols.
Rollback of commit 32c6c15c8b9bc4e203529f60bedbc5cd8a496a36.
*** Reason for rollback ***
Rollforward with check that primary R.txt exists
*** Original change description ***
Automated [] rollback of commit 1f1f207573c7b9c3e2d3ca1ffb0780a8fd592214.
*** Reason for rollback ***
Doesn't handle aapt that doesn't generate R.txt properly.
--
MOS_MIGRATED_REVID=125559472
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Doesn't handle aapt that doesn't generate R.txt properly.
--
MOS_MIGRATED_REVID=125405481
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For android_binary rules, we regenerate all of
the R.java of the libraries to get the final
resource IDs. Compiling all of them together can
be slow with the normal JavaBuilder, so add a
specialized class writer.
Example build with many R.java classes:
- R.java -> R.class via JavaBuilder: over 80s
- ErrorProne takes about 40% of that. So turning off
ErrorProne would be projected to be 48s.
Some of ErrorProne slowness is from static field
checks (e.g., on Flag classes), which may look
up the same Type over and over.
In comparison, if we write our own bytecode with ASM:
- ~16s total
- 4.7s to parse R.txt
- 4.8s to write class files
- 5.8s to copy and compress .jar
TODO: clean up SymbolLoader patching (upstream)
This only creates the action. We will need to
separately wire this up in blaze.
NOTE: This also makes the exising R.txt loading
used by live code multi-threaded, since that is
partly I/O-bound. Something to watch out for
(for flakiness, etc.) once this is submitted.
--
MOS_MIGRATED_REVID=125384467
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Rolling forward with fixed proto call to getMappedStringValue.
*** Original change description ***
Automated [] rollback of commit 4f854d47888d011354357e965fd3c7bf1d74b95f.
*** Reason for rollback ***
Breakage: http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/601/
*** Original change description ***
Xml processing fixes:
* Support for <item name="foo" type="id">7x0000</item>
* Adds <eat-comment/> after source attributions to ensure they are not sent to the final binary
* Store attributes for arrays to the string translatable=false case
--
MOS_MIGRATED_REVID=124748547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breakage: http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/601/
*** Original change description ***
Xml processing fixes:
* Support for <item name="foo" type="id">7x0000</item>
* Adds <eat-comment/> after source attributions to ensure they are not sent to the final binary
* Store attributes for arrays to the string translatable=false case
--
MOS_MIGRATED_REVID=124708349
|