From f654a19a21312a9723b207d355bad64a475e395c Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sun, 31 Jul 2022 20:47:16 -0400 Subject: [PATCH] Initial support for building against AOSP tree Note that this support is highly experimental. Currently, a few issues remain to be solved: * Prebuilt libraries are needed for zxing and asn1bean. This will be pushed as a separate repository that can be included in the prebuilts/ directory. * The TelephonyManagerHiddenApi class needs to be excluded in AOSP builds * In order to support multiple AOSP versions, the OpenEuiccService class needs to be turned into a custom interface with a default impl, and then we need to introduce impls for the system EuiccService depending on which version of AOSP we are building on. This could be kind of problematic, and I'm not sure whether we should do this yet. --- Android.bp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Android.bp diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..672d811 --- /dev/null +++ b/Android.bp @@ -0,0 +1,35 @@ +android_app { + name: "OpenEUICC", + static_libs: [ + // Dependencies that must be pulled from maven + "asn1bean-prebuilt-jar", + "zxing-core-prebuilt-jar", + "zxing-android-embedded-prebuilt-aar", + + // Dependencies included with AOSP + "androidx.appcompat_appcompat", + "androidx.cardview_cardview", + "androidx-constraintlayout_constraintlayout", + "androidx.core_core-ktx", + "androidx.lifecycle_lifecycle-runtime-ktx", + "androidx.swiperefreshlayout_swiperefreshlayout", + "com.google.android.material_material", + "gson-prebuilt-jar", + ], + srcs: [ + // Main app + "app/src/main/**/*.kt", + + // TruPhone LPAd library + "libs/lpad-sm-dp-plus-connector/src/generated/**/*.java", + "libs/lpad-sm-dp-plus-connector/src/main/**/*.java", + "libs/lpad-sm-dp-plus-connector/src/main/**/*.kt", + ], + resource_dirs: [ + "app/src/main/res", + ], + manifest: "app/src/main/AndroidManifest.xml", + privileged: true, + platform_apis: true, + system_ext_specific: true, +}