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" |
| 66 | library_src = "lineage/lib/main/java" |
| 67 | |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 68 | lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES = [ |
Luofan Chen | 3ee2102 | 2023-03-01 19:12:53 +0800 | [diff] [blame^] | 69 | "vendor.lineage.health-V1-java", |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 70 | "vendor.lineage.livedisplay-V2.0-java", |
Arian | 5f3ded7 | 2020-07-29 16:01:55 +0200 | [diff] [blame] | 71 | "vendor.lineage.livedisplay-V2.1-java", |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 72 | "vendor.lineage.touch-V1.0-java", |
LuK1337 | 2cb9a5d | 2019-09-06 23:51:36 +0200 | [diff] [blame] | 73 | "vendor.lineage.trust-V1.0-java", |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 74 | ] |
| 75 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 76 | // READ ME: ######################################################## |
| 77 | // |
| 78 | // When updating this list of aidl files, consider if that aidl is |
| 79 | // part of the SDK API. If it is, also add it to the list below that |
| 80 | // is preprocessed and distributed with the SDK. This list should |
| 81 | // not contain any aidl files for parcelables, but the one below should |
| 82 | // if you intend for 3rd parties to be able to send those objects |
| 83 | // across process boundaries. |
| 84 | // |
| 85 | // READ ME: ######################################################## |
| 86 | |
| 87 | java_library { |
| 88 | name: "org.lineageos.platform", |
LuK1337 | 85463df | 2019-09-07 00:55:40 +0200 | [diff] [blame] | 89 | installable: true, |
LuK1337 | fcfcf5d | 2020-09-14 10:50:41 +0200 | [diff] [blame] | 90 | sdk_version: "core_platform", |
LuK1337 | 514848c | 2022-08-30 09:24:33 +0200 | [diff] [blame] | 91 | static_libs: lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 92 | |
| 93 | libs: [ |
LuK1337 | fcfcf5d | 2020-09-14 10:50:41 +0200 | [diff] [blame] | 94 | "framework", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 95 | "services", |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 96 | ], |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 97 | |
| 98 | srcs: [ |
| 99 | lineage_sdk_src + "/**/*.java", |
| 100 | lineage_sdk_internal_src + "/**/*.java", |
| 101 | library_src + "/**/*.java", |
| 102 | lineage_sdk_src + "/**/I*.aidl", |
| 103 | lineage_sdk_internal_src + "/**/I*.aidl", |
Luca Stefani | 04c0fc1 | 2021-10-12 18:00:43 +0200 | [diff] [blame] | 104 | |
| 105 | // For the generated R.java and Manifest.java |
| 106 | ":org.lineageos.platform-res{.aapt.srcjar}", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 107 | ], |
| 108 | |
| 109 | // Include aidl files from lineageos.app namespace as well as internal src aidl files |
| 110 | aidl: { |
| 111 | local_include_dirs: ["sdk/src/java"], |
| 112 | }, |
| 113 | } |
| 114 | |
| 115 | // Full target for use by platform apps |
| 116 | // ============================================================ |
| 117 | |
Sam Mortimer | e8814c5 | 2019-09-05 14:07:27 -0700 | [diff] [blame] | 118 | java_library { |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 119 | name: "org.lineageos.platform.internal", |
| 120 | required: ["services"], |
LuK1337 | 514848c | 2022-08-30 09:24:33 +0200 | [diff] [blame] | 121 | static_libs: lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 122 | |
| 123 | srcs: [ |
| 124 | lineage_sdk_src + "/**/*.java", |
| 125 | lineage_sdk_internal_src + "/**/*.java", |
| 126 | lineage_sdk_src + "/**/I*.aidl", |
| 127 | lineage_sdk_internal_src + "/**/I*.aidl", |
Luca Stefani | 04c0fc1 | 2021-10-12 18:00:43 +0200 | [diff] [blame] | 128 | |
| 129 | // For the generated R.java and Manifest.java |
| 130 | ":org.lineageos.platform-res{.aapt.srcjar}", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 131 | ], |
| 132 | |
| 133 | aidl: { |
| 134 | local_include_dirs: ["sdk/src/java"], |
| 135 | }, |
| 136 | } |
| 137 | |
LuK1337 | 6ba6805 | 2022-11-02 12:47:48 +0100 | [diff] [blame] | 138 | // Resources only target for use by core |
| 139 | // ============================================================ |
| 140 | |
| 141 | java_library { |
| 142 | name: "org.lineageos.platform.resources", |
| 143 | |
| 144 | srcs: [ |
| 145 | // For the generated R.java and Manifest.java |
| 146 | ":org.lineageos.platform-res{.aapt.srcjar}", |
| 147 | ], |
| 148 | |
| 149 | sdk_version: "core_current", |
| 150 | } |
| 151 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 152 | // The SDK |
| 153 | // ============================================================ |
| 154 | |
| 155 | // Included aidl files from lineageos.app namespace |
| 156 | |
Sam Mortimer | e8814c5 | 2019-09-05 14:07:27 -0700 | [diff] [blame] | 157 | java_library { |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 158 | name: "org.lineageos.platform.sdk", |
| 159 | required: ["services"], |
LuK1337 | 514848c | 2022-08-30 09:24:33 +0200 | [diff] [blame] | 160 | static_libs: lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 161 | |
| 162 | srcs: [ |
| 163 | lineage_sdk_src + "/**/*.java", |
| 164 | lineage_sdk_src + "/**/I*.aidl", |
Luca Stefani | 04c0fc1 | 2021-10-12 18:00:43 +0200 | [diff] [blame] | 165 | |
| 166 | // For the generated R.java and Manifest.java |
| 167 | ":org.lineageos.platform-res{.aapt.srcjar}", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 168 | ], |
| 169 | |
| 170 | aidl: { |
| 171 | local_include_dirs: ["sdk/src/java"], |
| 172 | }, |
| 173 | } |
Sam Mortimer | 89f2037 | 2020-12-10 15:59:40 -0800 | [diff] [blame] | 174 | |
| 175 | // Minimal LineageSettings lib for apex use. |
| 176 | // ============================================================ |
| 177 | |
| 178 | java_library { |
| 179 | name: "org.lineageos.platform.lineagesettings", |
Oliver Scott | 55652b7 | 2021-11-08 15:45:35 -0500 | [diff] [blame] | 180 | min_sdk_version: "30", |
Sam Mortimer | 89f2037 | 2020-12-10 15:59:40 -0800 | [diff] [blame] | 181 | |
| 182 | // LineageSettings is our main target, the rest are deps. |
| 183 | srcs: [ |
| 184 | lineage_sdk_src + "/app/LineageContextConstants.java", |
| 185 | lineage_sdk_src + "/providers/LineageSettings.java", |
| 186 | lineage_sdk_src + "/trust/ITrustInterface.aidl", |
| 187 | lineage_sdk_src + "/trust/TrustInterface.java", |
Luca Stefani | 04c0fc1 | 2021-10-12 18:00:43 +0200 | [diff] [blame] | 188 | |
| 189 | // For the generated R.java and Manifest.java |
| 190 | ":org.lineageos.platform-res{.aapt.srcjar}", |
Sam Mortimer | 89f2037 | 2020-12-10 15:59:40 -0800 | [diff] [blame] | 191 | ], |
| 192 | |
| 193 | // List of apex modules that can link against this lib |
| 194 | apex_available: [ |
| 195 | "com.android.tethering", |
| 196 | ], |
| 197 | } |