From b0627a1dc05cc25b2475015af718a57302a07a1d Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Fri, 1 Dec 2023 17:51:18 -0500 Subject: [PATCH] Fixup Android.bp build after app-common split --- Android.bp | 40 ++++++++++++++++++++----- app-common/src/main/AndroidManifest.xml | 5 ++-- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/Android.bp b/Android.bp index 26d0b84..5394d17 100644 --- a/Android.bp +++ b/Android.bp @@ -1,6 +1,19 @@ -android_app { - name: "OpenEUICC", +java_library { + name: "net.typeblog.lpac_jni", + srcs: [ + "libs/lpac-jni/src/main/**/*.kt", + ], + optimize: { + enabled: false, + }, + system_ext_specific: true, +} + +android_library { + name: "OpenEUICC-common", static_libs: [ + "net.typeblog.lpac_jni", + // Dependencies that must be pulled from maven, "zxing-core-prebuilt-jar", "zxing-android-embedded-prebuilt-aar", @@ -13,18 +26,31 @@ android_app { "androidx.lifecycle_lifecycle-runtime-ktx", "androidx.swiperefreshlayout_swiperefreshlayout", "com.google.android.material_material", - "gson", "kotlinx_coroutines", ], + srcs: [ + "app-common/src/main/**/*.kt", + ], + optimize: { + enabled: false, + }, + resource_dirs: [ + "app-common/src/main/res", + ], + manifest: "app-common/src/main/AndroidManifest.xml", + system_ext_specific: true, +} + +android_app { + name: "OpenEUICC", + static_libs: [ + "OpenEUICC-common", + ], jni_libs: [ "liblpac-jni", ], srcs: [ - // Main app "app/src/main/**/*.kt", - - // lpac-jni interface - "libs/lpac-jni/src/main/**/*.kt", ], optimize: { enabled: false, diff --git a/app-common/src/main/AndroidManifest.xml b/app-common/src/main/AndroidManifest.xml index 5b828f8..2492952 100644 --- a/app-common/src/main/AndroidManifest.xml +++ b/app-common/src/main/AndroidManifest.xml @@ -1,6 +1,7 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + package="im.angry.openeuicc.common"> @@ -12,4 +13,4 @@ android:screenOrientation="fullSensor" tools:replace="screenOrientation" /> - \ No newline at end of file +