Implement Android.bp building with AOSP for lpac_jni
This commit is contained in:
parent
b5a63f3de3
commit
7c21cda40c
4 changed files with 61 additions and 9 deletions
14
Android.bp
14
Android.bp
|
@ -1,8 +1,7 @@
|
|||
android_app {
|
||||
name: "OpenEUICC",
|
||||
static_libs: [
|
||||
// Dependencies that must be pulled from maven
|
||||
"asn1bean-prebuilt-jar",
|
||||
// Dependencies that must be pulled from maven,
|
||||
"zxing-core-prebuilt-jar",
|
||||
"zxing-android-embedded-prebuilt-aar",
|
||||
|
||||
|
@ -14,17 +13,18 @@ android_app {
|
|||
"androidx.lifecycle_lifecycle-runtime-ktx",
|
||||
"androidx.swiperefreshlayout_swiperefreshlayout",
|
||||
"com.google.android.material_material",
|
||||
"gson-prebuilt-jar",
|
||||
"gson",
|
||||
"kotlinx_coroutines",
|
||||
],
|
||||
jni_libs: [
|
||||
"liblpac-jni",
|
||||
],
|
||||
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",
|
||||
// lpac-jni interface
|
||||
"libs/lpac-jni/src/main/**/*.kt",
|
||||
],
|
||||
resource_dirs: [
|
||||
"app/src/main/res",
|
||||
|
|
0
Android.mk
Normal file
0
Android.mk
Normal file
|
@ -1,7 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="ProtectedPermissions">
|
||||
tools:ignore="ProtectedPermissions"
|
||||
package="im.angry.openeuicc">
|
||||
|
||||
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
|
||||
|
@ -54,4 +55,4 @@
|
|||
tools:replace="screenOrientation" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
|
51
libs/lpac-jni/src/main/jni/Android.bp
Normal file
51
libs/lpac-jni/src/main/jni/Android.bp
Normal file
|
@ -0,0 +1,51 @@
|
|||
cc_defaults {
|
||||
name: "lpac-jni-defaults",
|
||||
local_include_dirs: ["lpac"],
|
||||
sdk_version: "current",
|
||||
cflags: ["-Wno-error"],
|
||||
}
|
||||
|
||||
cc_library_static {
|
||||
name: "liblpac-cjson",
|
||||
defaults: ["lpac-jni-defaults"],
|
||||
srcs: [
|
||||
"lpac/cjson/*.c",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_static {
|
||||
name: "liblpac-asn1c",
|
||||
defaults: ["lpac-jni-defaults"],
|
||||
local_include_dirs: ["lpac/euicc/asn1c"],
|
||||
cflags: ["-DHAVE_CONFIG_H"],
|
||||
srcs: [
|
||||
"lpac/euicc/asn1c/asn1/*.c",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_static {
|
||||
name: "liblpac-euicc",
|
||||
defaults: ["lpac-jni-defaults"],
|
||||
srcs: [
|
||||
"lpac/euicc/*.c",
|
||||
],
|
||||
static_libs: [
|
||||
"liblpac-asn1c",
|
||||
"liblpac-cjson",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "liblpac-jni",
|
||||
defaults: ["lpac-jni-defaults"],
|
||||
header_libs: ["jni_headers"],
|
||||
srcs: [
|
||||
"lpac-jni/*.c",
|
||||
],
|
||||
static_libs: [
|
||||
"liblpac-euicc",
|
||||
"liblpac-asn1c",
|
||||
"liblpac-cjson",
|
||||
],
|
||||
shared_libs: ["liblog"],
|
||||
}
|
Loading…
Reference in a new issue