diff options
author | Jiyong Park <jiyong@google.com> | 2019-07-15 15:31:16 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2019-07-15 17:21:20 +0900 |
commit | 53554e25593d6498a229d1dc89208aade4137008 (patch) | |
tree | f3487ca0f2fb9057a00164619277496e9cc895a4 /java/hiddenapi_singleton.go | |
parent | 716828ab4ec2a673e6022171bb2b52584ee8e916 (diff) | |
download | android_build_soong-53554e25593d6498a229d1dc89208aade4137008.tar.gz android_build_soong-53554e25593d6498a229d1dc89208aade4137008.tar.bz2 android_build_soong-53554e25593d6498a229d1dc89208aade4137008.zip |
Fix the unbundled mainline module build
This change fixes two problems:
1) the prebuilt apexes are force disabled for the unbundled builds
because we need to build the modules from the source then
2) the dependencies from an sdk_library module to
*.stubs.{public|system|tests} are not added for the unbundled build
because the stubs modules are disabled.
Bug: 137282010
Test: unbundled mainline builds are successful
Test: build com.android.media and inspect the jar file to see if
hiddenapi flags are there
$ cd out/dist/mainline_modules_arm
$ unzip com.android.media.apex apex_payload.img
$ mkdir -p mnt
$ sudo mount -o ro,loop apex_payload.img mnt
$ dexdump2 mnt/javalib/updatable-media.jar | grep hiddenapi
shows results
Merged-In: I2c00af07aac4a15770d3acab011a36e2e4803bfc
Change-Id: I2c00af07aac4a15770d3acab011a36e2e4803bfc
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r-- | java/hiddenapi_singleton.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index 9627dc64..09936ea7 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -94,7 +94,7 @@ func stubFlagsRule(ctx android.SingletonContext) { // Add the android.test.base to the set of stubs only if the android.test.base module is on // the boot jars list as the runtime will only enforce hiddenapi access against modules on // that list. - if inList("android.test.base", ctx.Config().BootJars()) { + if inList("android.test.base", ctx.Config().BootJars()) && !ctx.Config().UnbundledBuildUsePrebuiltSdks() { publicStubModules = append(publicStubModules, "android.test.base.stubs") } |