aboutsummaryrefslogtreecommitdiffstats
path: root/java/android_manifest.go
diff options
context:
space:
mode:
authorJaewoong Jung <jungjw@google.com>2019-05-30 15:51:14 -0700
committerJaewoong Jung <jungjw@google.com>2019-06-03 10:51:42 -0700
commitc27ab6678bbf25cca5aec485f8ad1ed0bc3b3c83 (patch)
tree3de9b2bfbce4d9fdaa2d4d60551c07aa625c4b85 /java/android_manifest.go
parent06b2c69cfecaef535b1e1ccfd256d840dc80afe4 (diff)
downloadbuild_soong-c27ab6678bbf25cca5aec485f8ad1ed0bc3b3c83.tar.gz
build_soong-c27ab6678bbf25cca5aec485f8ad1ed0bc3b3c83.tar.bz2
build_soong-c27ab6678bbf25cca5aec485f8ad1ed0bc3b3c83.zip
Touch up manifest if there's no source code.
The new package manager behavior requires packages without source code to have an application element with hasCode attribute set to false in their manifest. With this change, Soong can now automatically insert one for codeless apps. Test: app_test.go, manifest_fixer_test.py Fixes: 124375490 Change-Id: Ied89a8d07c63805ab910859a4f7c45fc1c60bb73
Diffstat (limited to 'java/android_manifest.go')
-rw-r--r--java/android_manifest.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/java/android_manifest.go b/java/android_manifest.go
index b5921be7..021883e6 100644
--- a/java/android_manifest.go
+++ b/java/android_manifest.go
@@ -53,7 +53,7 @@ var optionalUsesLibs = []string{
// Uses manifest_fixer.py to inject minSdkVersion, etc. into an AndroidManifest.xml
func manifestFixer(ctx android.ModuleContext, manifest android.Path, sdkContext sdkContext, sdkLibraries []string,
- isLibrary, useEmbeddedNativeLibs, usesNonSdkApis, useEmbeddedDex bool) android.Path {
+ isLibrary, useEmbeddedNativeLibs, usesNonSdkApis, useEmbeddedDex, hasNoCode bool) android.Path {
var args []string
if isLibrary {
@@ -87,6 +87,10 @@ func manifestFixer(ctx android.ModuleContext, manifest android.Path, sdkContext
}
}
+ if hasNoCode {
+ args = append(args, "--has-no-code")
+ }
+
var deps android.Paths
targetSdkVersion := sdkVersionOrDefault(ctx, sdkContext.targetSdkVersion())
if targetSdkVersion == ctx.Config().PlatformSdkCodename() &&