diff options
author | Anton Hansson <hansson@google.com> | 2020-08-13 19:40:13 +0100 |
---|---|---|
committer | Liz Kammer <eakammer@google.com> | 2020-10-15 15:18:46 +0000 |
commit | 47994f37433e5f3e6f4522403e645ff0826e77ba (patch) | |
tree | a3890036f2c3705f949d6743557c4397818d71c5 | |
parent | d5726423ca08fcfb6af0c4392d286b072c34b2a6 (diff) | |
download | base-47994f37433e5f3e6f4522403e645ff0826e77ba.tar.gz |
Make framework-res dep in stubs explicit
The android.jar stubs includes the resource from framework-res. This
dependency was previously added implicitly inside the build system, but
using a java_genrule we can add it directly, which makes it easier to
make changes to this rule.
This change has the side-effect of adding the resources to some stubs
that did not previously include the resources (e.g. module-libs), which
I think is desired.
Bug: 161214753
Test: build sdk, diff out/dist before and after (shows resources added
to some stubs)
Change-Id: I1829789af207cc45c49c0c68369fc7c0c085bcb0
Merged-In: I1829789af207cc45c49c0c68369fc7c0c085bcb0
-rw-r--r-- | StubLibraries.bp | 3 | ||||
-rw-r--r-- | core/res/Android.bp | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/StubLibraries.bp b/StubLibraries.bp index ef4e202fdfe2..3eb482dc5dc5 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -305,6 +305,9 @@ droidstubs { java_defaults { name: "android_defaults_stubs_current", libs: [ "stub-annotations" ], + static_libs: [ + "framework-res-package-jar", // Export package of framework-res + ], errorprone: { javacflags: [ "-XepDisableAllChecks", diff --git a/core/res/Android.bp b/core/res/Android.bp index b365de4f4630..f94a2b08e6c3 100644 --- a/core/res/Android.bp +++ b/core/res/Android.bp @@ -46,6 +46,13 @@ android_app { }, } +java_genrule { + name: "framework-res-package-jar", + srcs: [":framework-res{.export-package.apk}"], + out: ["framework-res-package.jar"], + cmd: "cp $(in) $(out)", +} + // This logic can be removed once robolectric's transition to binary resources is complete filegroup { name: "robolectric_framework_raw_res_files", |