aboutsummaryrefslogtreecommitdiffstats
path: root/java/aar.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-02-05 21:55:21 -0800
committerColin Cross <ccross@android.com>2019-02-08 15:24:47 +0000
commite4246abd7f456eb4119f2cffc01bdfca852584b5 (patch)
treeda9d75703d09106d677b1d5b8976a6cdc601e6ce /java/aar.go
parent129b9ceeb147099a62c46b4ff74670bb1670e34b (diff)
downloadandroid_build_soong-e4246abd7f456eb4119f2cffc01bdfca852584b5.tar.gz
android_build_soong-e4246abd7f456eb4119f2cffc01bdfca852584b5.tar.bz2
android_build_soong-e4246abd7f456eb4119f2cffc01bdfca852584b5.zip
Make manifest and APK agree on uncompressed native libs
Only put uncompressed native libs in an APK if the min_sdk_version supports it (>= 23, Marshmallow), and set android:extractNativeLibs="false" in the AndroidManifest.xml so that the platform won't extract them anyways. Bug: 117618214 Test: m checkbuild Change-Id: I760017e48bf3c6b618aabde0982df45995765d48
Diffstat (limited to 'java/aar.go')
-rw-r--r--java/aar.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/aar.go b/java/aar.go
index fcdd518b..f6a3d3a7 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -75,6 +75,7 @@ type aapt struct {
rTxt android.Path
extraAaptPackagesFile android.Path
isLibrary bool
+ uncompressedJNI bool
aaptProperties aaptProperties
}
@@ -181,7 +182,7 @@ func (a *aapt) buildActions(ctx android.ModuleContext, sdkContext sdkContext, ex
manifestFile := proptools.StringDefault(a.aaptProperties.Manifest, "AndroidManifest.xml")
manifestSrcPath := android.PathForModuleSrc(ctx, manifestFile)
- manifestPath := manifestMerger(ctx, manifestSrcPath, sdkContext, staticLibManifests, a.isLibrary)
+ manifestPath := manifestMerger(ctx, manifestSrcPath, sdkContext, staticLibManifests, a.isLibrary, a.uncompressedJNI)
linkFlags, linkDeps, resDirs, overlayDirs, rroDirs := a.aapt2Flags(ctx, sdkContext, manifestPath)
@@ -330,7 +331,7 @@ func (a *AndroidLibrary) DepsMutator(ctx android.BottomUpMutatorContext) {
}
func (a *AndroidLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
- a.isLibrary = true
+ a.aapt.isLibrary = true
a.aapt.buildActions(ctx, sdkContext(a))
ctx.CheckbuildFile(a.proguardOptionsFile)