blob: 8c4321ec2ec3f7e34d3e9f98d6052aef10e34902 [file] [log] [blame]
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -07001//
LuK1337fcfcf5d2020-09-14 10:50:41 +02002// Copyright (C) 2018-2020 The LineageOS Project
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -07003//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17android_app {
18 name: "org.lineageos.platform-res",
19 certificate: "platform",
Paul Duffin374e4df2019-06-12 13:47:18 +010020 sdk_version: "core_platform",
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070021 manifest: "lineage/res/AndroidManifest.xml",
22
23 aaptflags: [
24 "--auto-add-overlay",
25 "--private-symbols",
26 "org.lineageos.platform.internal",
27
28 // Framework doesn't need versioning since it IS the platform.
29 "--no-auto-version",
30
31 // Tell aapt to create "extending (non-application)" resource IDs,
32 // since these resources will be used by many apps.
33 "--allow-reserved-package-id",
34 // Use id 0x3f (one less than app id).
35 "--package-id",
36 "63",
37 ],
38
39 resource_dirs: [
40 "lineage/res/res",
Sam Mortimere8814c52019-09-05 14:07:27 -070041 "sdk/res/res",
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070042 ],
43
44 // Create package-export.apk, which other packages can use to get
45 // PRODUCT-agnostic resource data like IDs and type definitions.
46 export_package_resources: true,
47}
48
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070049// The LineageOS Platform Framework Library
50// ============================================================
51
52lineage_sdk_src = "sdk/src/java/lineageos"
53lineage_sdk_internal_src = "sdk/src/java/org/lineageos/internal"
54library_src = "lineage/lib/main/java"
55
Sam Mortimer3533d382019-05-13 15:28:04 -070056lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES = [
57 "androidx.preference_preference",
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070058]
59
Paul Keithb49ed552019-01-18 17:58:26 +010060lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES = [
61 "vendor.lineage.livedisplay-V2.0-java",
62 "vendor.lineage.touch-V1.0-java",
LuK13372cb9a5d2019-09-06 23:51:36 +020063 "vendor.lineage.trust-V1.0-java",
Paul Keithb49ed552019-01-18 17:58:26 +010064]
65
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070066// READ ME: ########################################################
67//
68// When updating this list of aidl files, consider if that aidl is
69// part of the SDK API. If it is, also add it to the list below that
70// is preprocessed and distributed with the SDK. This list should
71// not contain any aidl files for parcelables, but the one below should
72// if you intend for 3rd parties to be able to send those objects
73// across process boundaries.
74//
75// READ ME: ########################################################
76
77java_library {
78 name: "org.lineageos.platform",
LuK133785463df2019-09-07 00:55:40 +020079 installable: true,
LuK1337fcfcf5d2020-09-14 10:50:41 +020080 sdk_version: "core_platform",
Bruno Martins7bf74322020-10-08 11:49:27 +010081 static_libs: lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070082
83 libs: [
LuK1337fcfcf5d2020-09-14 10:50:41 +020084 "framework",
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070085 "services",
Sam Mortimer3533d382019-05-13 15:28:04 -070086 ],
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070087
88 srcs: [
89 lineage_sdk_src + "/**/*.java",
90 lineage_sdk_internal_src + "/**/*.java",
91 library_src + "/**/*.java",
92 lineage_sdk_src + "/**/I*.aidl",
93 lineage_sdk_internal_src + "/**/I*.aidl",
94 ],
95
96 // Include aidl files from lineageos.app namespace as well as internal src aidl files
97 aidl: {
98 local_include_dirs: ["sdk/src/java"],
99 },
100}
101
102// Full target for use by platform apps
103// ============================================================
104
Sam Mortimere8814c52019-09-05 14:07:27 -0700105java_library {
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -0700106 name: "org.lineageos.platform.internal",
107 required: ["services"],
Bruno Martins7bf74322020-10-08 11:49:27 +0100108 static_libs: lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -0700109
110 srcs: [
111 lineage_sdk_src + "/**/*.java",
112 lineage_sdk_internal_src + "/**/*.java",
113 lineage_sdk_src + "/**/I*.aidl",
114 lineage_sdk_internal_src + "/**/I*.aidl",
115 ],
116
117 aidl: {
118 local_include_dirs: ["sdk/src/java"],
119 },
120}
121
122// The SDK
123// ============================================================
124
125// Included aidl files from lineageos.app namespace
126
Sam Mortimere8814c52019-09-05 14:07:27 -0700127java_library {
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -0700128 name: "org.lineageos.platform.sdk",
129 required: ["services"],
Sam Mortimer3533d382019-05-13 15:28:04 -0700130 static_libs: lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -0700131
132 srcs: [
133 lineage_sdk_src + "/**/*.java",
134 lineage_sdk_src + "/**/I*.aidl",
135 ],
136
137 aidl: {
138 local_include_dirs: ["sdk/src/java"],
139 },
140}