Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 1 | // |
LuK1337 | fcfcf5d | 2020-09-14 10:50:41 +0200 | [diff] [blame] | 2 | // Copyright (C) 2018-2020 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", |
| 19 | certificate: "platform", |
Paul Duffin | 374e4df | 2019-06-12 13:47:18 +0100 | [diff] [blame] | 20 | sdk_version: "core_platform", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 21 | 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 Mortimer | e8814c5 | 2019-09-05 14:07:27 -0700 | [diff] [blame] | 41 | "sdk/res/res", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 42 | ], |
| 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-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 49 | // The LineageOS Platform Framework Library |
| 50 | // ============================================================ |
| 51 | |
| 52 | lineage_sdk_src = "sdk/src/java/lineageos" |
| 53 | lineage_sdk_internal_src = "sdk/src/java/org/lineageos/internal" |
| 54 | library_src = "lineage/lib/main/java" |
| 55 | |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 56 | lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES = [ |
| 57 | "androidx.preference_preference", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 58 | ] |
| 59 | |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 60 | lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES = [ |
| 61 | "vendor.lineage.livedisplay-V2.0-java", |
| 62 | "vendor.lineage.touch-V1.0-java", |
LuK1337 | 2cb9a5d | 2019-09-06 23:51:36 +0200 | [diff] [blame] | 63 | "vendor.lineage.trust-V1.0-java", |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 64 | ] |
| 65 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 66 | // 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 | |
| 77 | java_library { |
| 78 | name: "org.lineageos.platform", |
LuK1337 | 85463df | 2019-09-07 00:55:40 +0200 | [diff] [blame] | 79 | installable: true, |
LuK1337 | fcfcf5d | 2020-09-14 10:50:41 +0200 | [diff] [blame] | 80 | sdk_version: "core_platform", |
Bruno Martins | 7bf7432 | 2020-10-08 11:49:27 +0100 | [diff] [blame^] | 81 | static_libs: lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 82 | |
| 83 | libs: [ |
LuK1337 | fcfcf5d | 2020-09-14 10:50:41 +0200 | [diff] [blame] | 84 | "framework", |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 85 | "services", |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 86 | ], |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 87 | |
| 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 Mortimer | e8814c5 | 2019-09-05 14:07:27 -0700 | [diff] [blame] | 105 | java_library { |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 106 | name: "org.lineageos.platform.internal", |
| 107 | required: ["services"], |
Bruno Martins | 7bf7432 | 2020-10-08 11:49:27 +0100 | [diff] [blame^] | 108 | static_libs: lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 109 | |
| 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 Mortimer | e8814c5 | 2019-09-05 14:07:27 -0700 | [diff] [blame] | 127 | java_library { |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 128 | name: "org.lineageos.platform.sdk", |
| 129 | required: ["services"], |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 130 | static_libs: lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 131 | |
| 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 | } |