Files
lineage-sdk/Android.bp
Michael W 8505f77f36 sdk: Make phone a new compile target
* Moving SensitivePhoneNumbers to sdk got us significantly bigger
  zip packages due to libphonenumber being part of every package that is
  using org.lineageos.platform or org.lineageos.platform.internal
* In order to correct this, move the "phone" folder to an own library that
  statically links libphonennumber and subsequentially make use of that
  package where needed

Change-Id: I4effd7a9248290aeb23ab47ff8e30385dce4401a
2019-11-23 13:10:42 +00:00

143 lines
4.2 KiB
Plaintext

//
// Copyright (C) 2018-2019 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
android_app {
name: "org.lineageos.platform-res",
certificate: "platform",
no_framework_libs: true,
manifest: "lineage/res/AndroidManifest.xml",
aaptflags: [
"--auto-add-overlay",
"--private-symbols",
"org.lineageos.platform.internal",
// Framework doesn't need versioning since it IS the platform.
"--no-auto-version",
// Tell aapt to create "extending (non-application)" resource IDs,
// since these resources will be used by many apps.
"--allow-reserved-package-id",
// Use id 0x3f (one less than app id).
"--package-id",
"63",
],
resource_dirs: [
"lineage/res/res",
"sdk/res/res",
],
// Create package-export.apk, which other packages can use to get
// PRODUCT-agnostic resource data like IDs and type definitions.
export_package_resources: true,
}
// The LineageOS Platform Framework Library
// ============================================================
lineage_sdk_src = "sdk/src/java/lineageos"
lineage_sdk_internal_src = "sdk/src/java/org/lineageos/internal"
library_src = "lineage/lib/main/java"
lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES = [
"androidx.preference_preference",
]
lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES = [
"vendor.lineage.livedisplay-V2.0-java",
"vendor.lineage.touch-V1.0-java",
"vendor.lineage.trust-V1.0-java",
]
// READ ME: ########################################################
//
// When updating this list of aidl files, consider if that aidl is
// part of the SDK API. If it is, also add it to the list below that
// is preprocessed and distributed with the SDK. This list should
// not contain any aidl files for parcelables, but the one below should
// if you intend for 3rd parties to be able to send those objects
// across process boundaries.
//
// READ ME: ########################################################
java_library {
name: "org.lineageos.platform",
installable: true,
static_libs: [
"telephony-ext",
] + lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
libs: [
"services",
],
srcs: [
lineage_sdk_src + "/**/*.java",
lineage_sdk_internal_src + "/**/*.java",
library_src + "/**/*.java",
lineage_sdk_src + "/**/I*.aidl",
lineage_sdk_internal_src + "/**/I*.aidl",
],
// Include aidl files from lineageos.app namespace as well as internal src aidl files
aidl: {
local_include_dirs: ["sdk/src/java"],
},
}
// Full target for use by platform apps
// ============================================================
java_library {
name: "org.lineageos.platform.internal",
required: ["services"],
static_libs: [
"telephony-ext",
] + lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
srcs: [
lineage_sdk_src + "/**/*.java",
lineage_sdk_internal_src + "/**/*.java",
lineage_sdk_src + "/**/I*.aidl",
lineage_sdk_internal_src + "/**/I*.aidl",
],
aidl: {
local_include_dirs: ["sdk/src/java"],
},
}
// The SDK
// ============================================================
// Included aidl files from lineageos.app namespace
java_library {
name: "org.lineageos.platform.sdk",
required: ["services"],
static_libs: lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
srcs: [
lineage_sdk_src + "/**/*.java",
lineage_sdk_src + "/**/I*.aidl",
],
aidl: {
local_include_dirs: ["sdk/src/java"],
},
}