Added support for expressing overlay manifest in tests

Added support in ManifestMergerTest for overlay manifest files
and added regression tests for :
- not providing a package in an overlay file
- providing a package with the same value as the main manifest file
package
- provided a different package name in an overlay (error)

Change-Id: I2503a220fe8afeaa09d4b3772a8a2a5ea77b83de
Use aapt ignore patterns when processig resources and assets

This CL updates the gradle resource merger's code which scans
through resource and asset folders such that it uses the same
ignore rules as the aapt tool. Among other things, this fixes
the scenario described in issue 69884 where a build will fail
if there is a .git folder in res/.

Change-Id: Ia6a9ccf8d1dcd5a84122751162f1360ee3c9b18e
73282: lintVital failure output should go to stderr

Allow lint reports to be written to stderr (and do so by default
for the lint vital task)

Change-Id: I27e81571a158abd6992f28fdd2ddb9c3d7e67c5c
Add validation to ListFragment template

The ListFragment template previously was using globals to calculate
its layout resource values. This is now handled by properly validated
parameters.

Fixes https://code.google.com/p/android/issues/detail?id=74253
Change-Id: I87ad3f72d047ce6af859d19a182838836327c916
Merge "Add validation to ListFragment template" into idea133
Allows exporting PreferenceActivities if it is deemed safe.

This turns off the PreferenceActivityDetector lint check in cases
where the target SDK version of the project is 19 or greater
and isValidFragment is overridden by the activity in question.
The security issue that PreferenceActivityDetector checks for
was patched in version 19 and so the lint check was being
a little too aggressive before this change.

Change-Id: I32cf749254aed5ba0321288ea662723b9c7862a2
Signed-off-by: Shannon Chen <shannonchen@google.com>
Merge "Allows exporting PreferenceActivities if it is deemed safe." into idea133
Merge "73282: lintVital failure output should go to stderr" into idea133
Add ability to fire a single HPIF request.

Change-Id: Ia730955d9ebd48d532762224c7ffbf988cbedd0f
Merge "Add ability to fire a single HPIF request." into idea133
Merge "Added support for expressing overlay manifest in tests" into idea133
Do not fail non resolved placeholder in libraries

When placeholders are not resolved in library files, it is now considered
that the resolution will be provided during application building.
This allows to put placeholders in built library files and have
such placeholders resolved per application.

Change-Id: I6447ba3b3c5bf0f43d1c24e782d8719d3b605294
Merge "Do not fail non resolved placeholder in libraries" into idea133
Made placeholders field common to build types and build flavors.

Up to now, users could only specify placeholders values in the build flavors
part of the build.gradle.
With this change, placeholders values (with the same syntax) can also be
specified in the build type declaration. The build type value will always
override build flavor values for the same key.

Change-Id: I35016a520666bd5f0ae487ffa81cf9a12711c069
Merge "Made placeholders field common to build types and build flavors." into idea133
Update lint gradle unit test golden file

Change-Id: I314aea9dcdfbb92020ba9bd1cef94a3f10e575ed
Merge "Update lint gradle unit test golden file" into idea133
74353: Importing projects and their string values

Looks up the Eclipse encoding settings in projects and workspace
settings and uses that to read the files before writing them
out as UTF-8, which we use universally in the Gradle projects.

Change-Id: I7fbed99d75e7e80265be8bdb147766ad644208f1
Fix path unit tests for Windows.

Two issues:
- In an expression like new File("/foo"), the *current* drive
  letter is automatically added on Windows, which is not always
  C:. So instead use "C:/foo" on Windows and "/foo" on Mac/Linux
  to make sure a drive letter is specified.
- When converted to a URL, "C:/foo" becomes "file:/C:/foo".

Change-Id: I5a8534aaf9f83021bcdc8b30a3f768ef37e8318a
Stop trying to do static validation of Gradle files

Dismantles Lint checks that try to validate Gradle build files via
static analysis. Given the dynamic nature of Gradle/Groovy and the
extent to which users are encouraged to take advantage of it, even
common use cases trip up static analysis and cause false positives.

Bug: 73678
Bug: 73939
Bug: 74278
Change-Id: I9d7adcb7d1a9c2dee67a48ab0bff82ddaf70d666