Replace aapt support with aapt2
Use aapt2 instead of aapt to compile Android app resources.
Also generate all files into srcjars instead of individual
sources.
Test: m checkbuild
Change-Id: I5a67991a0daf0017e8159b46fcff7d5564a91468
diff --git a/android/config.go b/android/config.go
index 79ff32a..2589f71 100644
--- a/android/config.go
+++ b/android/config.go
@@ -175,7 +175,12 @@
func TestConfig(buildDir string, env map[string]string) Config {
config := &config{
ProductVariables: productVariables{
- DeviceName: stringPtr("test_device"),
+ DeviceName: stringPtr("test_device"),
+ Platform_sdk_version: intPtr(26),
+ AAPTConfig: &[]string{"normal", "large", "xlarge", "hdpi", "xhdpi", "xxhdpi"},
+ AAPTPreferredConfig: stringPtr("xhdpi"),
+ AAPTCharacteristics: stringPtr("nosdcard"),
+ AAPTPrebuiltDPI: &[]string{"xhdpi", "xxhdpi"},
},
buildDir: buildDir,
@@ -417,12 +422,11 @@
return true
}
-func (c *config) ResourceOverlays() []SourcePath {
- return nil
-}
-
-func (c *config) PlatformVersion() string {
- return "M"
+func (c *config) ResourceOverlays() []string {
+ if c.ProductVariables.ResourceOverlays == nil {
+ return nil
+ }
+ return *c.ProductVariables.ResourceOverlays
}
func (c *config) PlatformSdkVersionInt() int {
@@ -445,6 +449,10 @@
}
}
+func (c *config) AppsDefaultVersionName() string {
+ return String(c.ProductVariables.AppsDefaultVersionName)
+}
+
// Codenames that are active in the current lunch target.
func (c *config) PlatformVersionActiveCodenames() []string {
return c.ProductVariables.Platform_version_active_codenames
@@ -466,10 +474,6 @@
return combined
}
-func (c *config) BuildNumber() string {
- return "000000"
-}
-
func (c *config) ProductAAPTConfig() []string {
return *c.ProductVariables.AAPTConfig
}