7 Commits

Author SHA1 Message Date
Luke Nicholson
b0643302c7 Enable obfuscation of resource names, with whitelisting support.
Test: Built aapt2, ran optimize on gmail apk with sample whitelist
config file, and flags enabled. Added two unit tests to TableFlattener
covering obfuscation logic.

Change-Id: Iad6329d75ff440121bf1a2cdf09c5f4bf4199d9d
2017-12-04 17:54:05 -08:00
Adam Lesinski
a693c4a32e AAPT2: Move all file output to FileOutputStream
FileOutputStream is safe to use on Windows, as it opens
files using our compatibility API.

Bug: 68262818
Test: make aapt2_tests
Change-Id: Ib0b27e93edd609b49b1327db7d9867a002198ebb
2017-11-16 12:06:17 -08:00
TreeHugger Robot
903ed1b6f9 Merge "AAPT2: Differentiate between Android and Java package names" 2017-11-08 21:08:26 +00:00
Adam Lesinski
96ea08f1e7 AAPT2: Differentiate between Android and Java package names
Android package names are more strict (ASCII only) than Java package names.
Also fixed an issue where trailing underscores were disallowed in Android
package names.

Bug: 68468089
Test: make aapt2_tests
Change-Id: I1052e9e82b6617db6065ce448d9bf7972bb68d59
2017-11-07 11:31:17 -08:00
Adam Lesinski
93190b79d1 AAPT2: Better debugging output
Test: make aapt2_tests
Change-Id: I7778b773201381538dc1f2e376abee4eb33e44c0
2017-11-07 11:21:10 -08:00
Adam Lesinski
e967d3f6ac AAPT2: Fix JavaDoc first sentence extraction.
The old algorithm for detecting the first sentence of a JavaDoc comment
looked for the first occurence of '.'. This does not work when code or a
{@link android.R.styleable} link is encountered in the first sentence.

Switch to checking for whitespace characters after the '.' character.

Bug: 62900335
Test: make aapt2_tests
Change-Id: I8238f6a6304c9c2f92e2e576ca8962a59c2b20ea
2017-07-25 15:53:15 -07:00
Adam Lesinski
66ea840038 AAPT2: Accept Java unicode identifiers
Test: make aapt2_tests
Change-Id: I75a0e52d43b1785001bfe120eea7484f7bb4682b
2017-07-07 13:23:55 -07:00