Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 1 | // |
Luofan Chen | 3ee2102 | 2023-03-01 19:12:53 +0800 | [diff] [blame] | 2 | // Copyright (C) 2018-2023 The LineageOS Project |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 3 | // |
| 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 | |
| 17 | android_app { |
| 18 | name: "org.lineageos.platform-res", |
Paul Duffin | 374e4df | 2019-06-12 13:47:18 +0100 | [diff] [blame] | 19 | sdk_version: "core_platform", |
Luca Stefani | 50ff674 | 2021-10-12 18:00:26 +0200 | [diff] [blame] | 20 | certificate: "platform", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 21 | |
Luca Stefani | 50ff674 | 2021-10-12 18:00:26 +0200 | [diff] [blame] | 22 | manifest: "lineage/res/AndroidManifest.xml", |
| 23 | |
| 24 | // Disable dexpreopt and verify_uses_libraries check as the app |
| 25 | // contains no Java code to be dexpreopted. |
| 26 | enforce_uses_libs: false, |
| 27 | dex_preopt: { |
| 28 | enabled: false, |
| 29 | }, |
| 30 | |
| 31 | // Soong special-cases org.lineageos.platform-res to install this alongside |
| 32 | // the libraries at /system_ext/framework/org.lineageos.platform-res.apk. |
| 33 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 34 | aaptflags: [ |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 35 | "--private-symbols", |
| 36 | "org.lineageos.platform.internal", |
| 37 | |
| 38 | // Framework doesn't need versioning since it IS the platform. |
| 39 | "--no-auto-version", |
| 40 | |
Luca Stefani | 50ff674 | 2021-10-12 18:00:26 +0200 | [diff] [blame] | 41 | // Allow overlay to add resource |
| 42 | "--auto-add-overlay", |
| 43 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 44 | // Tell aapt to create "extending (non-application)" resource IDs, |
| 45 | // since these resources will be used by many apps. |
| 46 | "--allow-reserved-package-id", |
| 47 | // Use id 0x3f (one less than app id). |
| 48 | "--package-id", |
| 49 | "63", |
| 50 | ], |
| 51 | |
| 52 | resource_dirs: [ |
| 53 | "lineage/res/res", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 54 | ], |
| 55 | |
| 56 | // Create package-export.apk, which other packages can use to get |
| 57 | // PRODUCT-agnostic resource data like IDs and type definitions. |
| 58 | export_package_resources: true, |
| 59 | } |
| 60 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 61 | // The LineageOS Platform Framework Library |
| 62 | // ============================================================ |
| 63 | |
| 64 | lineage_sdk_src = "sdk/src/java/lineageos" |
| 65 | lineage_sdk_internal_src = "sdk/src/java/org/lineageos/internal" |
Dominik Baronelli | 88378e2 | 2024-06-23 18:36:36 +0200 | [diff] [blame] | 66 | lineage_sdk_minimal_internal_src = "sdk/src/java/org/lineageos/internal/minimal" |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 67 | library_src = "lineage/lib/main/java" |
| 68 | |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 69 | lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES = [ |
Luofan Chen | 3ee2102 | 2023-03-01 19:12:53 +0800 | [diff] [blame] | 70 | "vendor.lineage.health-V1-java", |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 71 | "vendor.lineage.livedisplay-V2.0-java", |
Arian | 5f3ded7 | 2020-07-29 16:01:55 +0200 | [diff] [blame] | 72 | "vendor.lineage.livedisplay-V2.1-java", |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 73 | "vendor.lineage.touch-V1.0-java", |
LuK1337 | 2cb9a5d | 2019-09-06 23:51:36 +0200 | [diff] [blame] | 74 | "vendor.lineage.trust-V1.0-java", |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 75 | ] |
| 76 | |
Dominik Baronelli | 88378e2 | 2024-06-23 18:36:36 +0200 | [diff] [blame] | 77 | java_library { |
Dominik Baronelli | 01947ec | 2024-07-14 10:31:47 +0200 | [diff] [blame^] | 78 | name: "services", |
Dominik Baronelli | 88378e2 | 2024-06-23 18:36:36 +0200 | [diff] [blame] | 79 | installable: true, |
| 80 | sdk_version: "core_platform", |
| 81 | static_libs: [ |
Dominik Baronelli | 01947ec | 2024-07-14 10:31:47 +0200 | [diff] [blame^] | 82 | "original.services", |
Dominik Baronelli | 88378e2 | 2024-06-23 18:36:36 +0200 | [diff] [blame] | 83 | ] + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
| 84 | |
| 85 | libs: [ |
| 86 | "framework", |
| 87 | ], |
| 88 | |
| 89 | srcs: [ |
| 90 | library_src + "/**/*.java", |
| 91 | lineage_sdk_minimal_internal_src + "/**/*.java", |
| 92 | lineage_sdk_src + "/**/*.java", |
| 93 | lineage_sdk_src + "/app/I*.aidl", |
| 94 | lineage_sdk_src + "/**/I*.aidl", |
| 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 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 102 | // READ ME: ######################################################## |
| 103 | // |
| 104 | // When updating this list of aidl files, consider if that aidl is |
| 105 | // part of the SDK API. If it is, also add it to the list below that |
| 106 | // is preprocessed and distributed with the SDK. This list should |
| 107 | // not contain any aidl files for parcelables, but the one below should |
| 108 | // if you intend for 3rd parties to be able to send those objects |
| 109 | // across process boundaries. |
| 110 | // |
| 111 | // READ ME: ######################################################## |
| 112 | |
| 113 | java_library { |
| 114 | name: "org.lineageos.platform", |
LuK1337 | 85463df | 2019-09-07 00:55:40 +0200 | [diff] [blame] | 115 | installable: true, |
LuK1337 | fcfcf5d | 2020-09-14 10:50:41 +0200 | [diff] [blame] | 116 | sdk_version: "core_platform", |
LuK1337 | 514848c | 2022-08-30 09:24:33 +0200 | [diff] [blame] | 117 | static_libs: lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 118 | |
| 119 | libs: [ |
LuK1337 | fcfcf5d | 2020-09-14 10:50:41 +0200 | [diff] [blame] | 120 | "framework", |
Dominik Baronelli | 01947ec | 2024-07-14 10:31:47 +0200 | [diff] [blame^] | 121 | "original.services", |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 122 | ], |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 123 | |
| 124 | srcs: [ |
| 125 | lineage_sdk_src + "/**/*.java", |
| 126 | lineage_sdk_internal_src + "/**/*.java", |
| 127 | library_src + "/**/*.java", |
| 128 | lineage_sdk_src + "/**/I*.aidl", |
| 129 | lineage_sdk_internal_src + "/**/I*.aidl", |
| 130 | ], |
| 131 | |
| 132 | // Include aidl files from lineageos.app namespace as well as internal src aidl files |
| 133 | aidl: { |
| 134 | local_include_dirs: ["sdk/src/java"], |
| 135 | }, |
| 136 | } |
| 137 | |
| 138 | // Full target for use by platform apps |
| 139 | // ============================================================ |
| 140 | |
Sam Mortimer | e8814c5 | 2019-09-05 14:07:27 -0700 | [diff] [blame] | 141 | java_library { |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 142 | name: "org.lineageos.platform.internal", |
Dominik Baronelli | 01947ec | 2024-07-14 10:31:47 +0200 | [diff] [blame^] | 143 | required: ["original.services"], |
LuK1337 | 514848c | 2022-08-30 09:24:33 +0200 | [diff] [blame] | 144 | static_libs: lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 145 | |
| 146 | srcs: [ |
| 147 | lineage_sdk_src + "/**/*.java", |
| 148 | lineage_sdk_internal_src + "/**/*.java", |
| 149 | lineage_sdk_src + "/**/I*.aidl", |
| 150 | lineage_sdk_internal_src + "/**/I*.aidl", |
| 151 | ], |
| 152 | |
| 153 | aidl: { |
| 154 | local_include_dirs: ["sdk/src/java"], |
| 155 | }, |
| 156 | } |
| 157 | |
LuK1337 | 6ba6805 | 2022-11-02 12:47:48 +0100 | [diff] [blame] | 158 | // Resources only target for use by core |
| 159 | // ============================================================ |
| 160 | |
| 161 | java_library { |
| 162 | name: "org.lineageos.platform.resources", |
| 163 | |
| 164 | srcs: [ |
| 165 | // For the generated R.java and Manifest.java |
| 166 | ":org.lineageos.platform-res{.aapt.srcjar}", |
| 167 | ], |
| 168 | |
| 169 | sdk_version: "core_current", |
| 170 | } |
| 171 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 172 | // The SDK |
| 173 | // ============================================================ |
| 174 | |
| 175 | // Included aidl files from lineageos.app namespace |
| 176 | |
Sam Mortimer | e8814c5 | 2019-09-05 14:07:27 -0700 | [diff] [blame] | 177 | java_library { |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 178 | name: "org.lineageos.platform.sdk", |
Dominik Baronelli | 01947ec | 2024-07-14 10:31:47 +0200 | [diff] [blame^] | 179 | required: ["original.services"], |
LuK1337 | 514848c | 2022-08-30 09:24:33 +0200 | [diff] [blame] | 180 | static_libs: lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 181 | |
| 182 | srcs: [ |
| 183 | lineage_sdk_src + "/**/*.java", |
| 184 | lineage_sdk_src + "/**/I*.aidl", |
Luca Stefani | 04c0fc1 | 2021-10-12 18:00:43 +0200 | [diff] [blame] | 185 | |
| 186 | // For the generated R.java and Manifest.java |
| 187 | ":org.lineageos.platform-res{.aapt.srcjar}", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 188 | ], |
| 189 | |
| 190 | aidl: { |
| 191 | local_include_dirs: ["sdk/src/java"], |
| 192 | }, |
| 193 | } |
Sam Mortimer | 89f2037 | 2020-12-10 15:59:40 -0800 | [diff] [blame] | 194 | |
| 195 | // Minimal LineageSettings lib for apex use. |
| 196 | // ============================================================ |
| 197 | |
| 198 | java_library { |
| 199 | name: "org.lineageos.platform.lineagesettings", |
Oliver Scott | 55652b7 | 2021-11-08 15:45:35 -0500 | [diff] [blame] | 200 | min_sdk_version: "30", |
Sam Mortimer | 89f2037 | 2020-12-10 15:59:40 -0800 | [diff] [blame] | 201 | |
| 202 | // LineageSettings is our main target, the rest are deps. |
| 203 | srcs: [ |
| 204 | lineage_sdk_src + "/app/LineageContextConstants.java", |
| 205 | lineage_sdk_src + "/providers/LineageSettings.java", |
| 206 | lineage_sdk_src + "/trust/ITrustInterface.aidl", |
| 207 | lineage_sdk_src + "/trust/TrustInterface.java", |
Luca Stefani | 04c0fc1 | 2021-10-12 18:00:43 +0200 | [diff] [blame] | 208 | |
| 209 | // For the generated R.java and Manifest.java |
| 210 | ":org.lineageos.platform-res{.aapt.srcjar}", |
Sam Mortimer | 89f2037 | 2020-12-10 15:59:40 -0800 | [diff] [blame] | 211 | ], |
| 212 | |
| 213 | // List of apex modules that can link against this lib |
| 214 | apex_available: [ |
| 215 | "com.android.tethering", |
| 216 | ], |
| 217 | } |