blob: cae7520d2c85fd1986e4cab16d076df4da123ec2 [file] [log] [blame]
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -07001//
Paul Keithb49ed552019-01-18 17:58:26 +01002// Copyright (C) 2018-2019 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,
Sam Mortimer3533d382019-05-13 15:28:04 -070080 static_libs: [
Michael Wbf0d04e2019-09-11 13:59:30 +020081 "telephony-ext",
Sam Mortimer3533d382019-05-13 15:28:04 -070082 ] + lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -070083
84 libs: [
85 "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"],
Sam Mortimer3533d382019-05-13 15:28:04 -0700108 static_libs: [
Michael Wbf0d04e2019-09-11 13:59:30 +0200109 "telephony-ext",
Sam Mortimer3533d382019-05-13 15:28:04 -0700110 ] + lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -0700111
112 srcs: [
113 lineage_sdk_src + "/**/*.java",
114 lineage_sdk_internal_src + "/**/*.java",
115 lineage_sdk_src + "/**/I*.aidl",
116 lineage_sdk_internal_src + "/**/I*.aidl",
117 ],
118
119 aidl: {
120 local_include_dirs: ["sdk/src/java"],
121 },
122}
123
124// The SDK
125// ============================================================
126
127// Included aidl files from lineageos.app namespace
128
Sam Mortimere8814c52019-09-05 14:07:27 -0700129java_library {
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -0700130 name: "org.lineageos.platform.sdk",
131 required: ["services"],
Sam Mortimer3533d382019-05-13 15:28:04 -0700132 static_libs: lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
Rashed Abdel-Tawab703249a2018-08-09 16:47:40 -0700133
134 srcs: [
135 lineage_sdk_src + "/**/*.java",
136 lineage_sdk_src + "/**/I*.aidl",
137 ],
138
139 aidl: {
140 local_include_dirs: ["sdk/src/java"],
141 },
142}