diff options
author | 2019-09-11 11:40:45 -0700 | |
---|---|---|
committer | 2019-09-11 21:12:10 +0000 | |
commit | b896c588af5489999c3a22e3713a2491811456c2 (patch) | |
tree | bcea22e1f0d97d3c81089b154009f6334de99cb7 | |
parent | e36d59ea710849861fbb8623bea52a06158cf37b (diff) |
Fix build file such that CarSystemUi can be easily extended
This is done buy building all of CarSystemUI as a library and then including that
library as a static lib for an android_app target. Thus anyone that wants to
build a derivative to CarSystemUI can include that library and start extending.
It is the same mechanism that allows CarSystemUI to extend the phone SystemUI
Bug:140875212
Test: Build and Deploy
Change-Id: I4c83b0147c5ce8a8b4321ba0866721e4922df431
-rw-r--r-- | packages/CarSystemUI/Android.bp | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/packages/CarSystemUI/Android.bp b/packages/CarSystemUI/Android.bp index bbae9ff51615..672879ae6e9d 100644 --- a/packages/CarSystemUI/Android.bp +++ b/packages/CarSystemUI/Android.bp @@ -13,18 +13,19 @@ // See the License for the specific language governing permissions and // limitations under the License. // -android_app { - name: "CarSystemUI", - - overrides: [ - "SystemUI", - ], +android_library { + name: "CarSystemUI-core", srcs: [ "src/**/*.java", "src/**/I*.aidl", ], + resource_dirs: [ + "res-keyguard", + "res", + ], + static_libs: [ "SystemUI-core", "CarNotificationLib", @@ -58,6 +59,28 @@ android_app { manifest: "AndroidManifest.xml", + plugins: ["dagger2-compiler-2.19"], + +} + +android_app { + name: "CarSystemUI", + + static_libs: [ + "CarSystemUI-core", + ], + + libs: [ + "telephony-common", + "android.car", + ], + + resource_dirs: [], + + overrides: [ + "SystemUI", + ], + platform_apis: true, product_specific: true, certificate: "platform", @@ -68,12 +91,6 @@ android_app { "proguard.flags", ], }, - resource_dirs: [ - "res-keyguard", - "res", - ], - - dxflags: ["--multi-dex"], aaptflags: [ @@ -81,6 +98,8 @@ android_app { "com.android.keyguard", ], + kotlincflags: ["-Xjvm-default=enable"], + plugins: ["dagger2-compiler-2.19"], required: ["privapp_whitelist_com.android.systemui"], |