Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 1 | // |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 2 | // Copyright (C) 2018-2019 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", |
Sam Mortimer | 4545327 | 2018-08-30 15:24:31 -0700 | [diff] [blame] | 20 | no_framework_libs: true, |
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", |
| 41 | "sdk/res/res" |
| 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 | |
| 49 | |
| 50 | // The LineageOS Platform Framework Library |
| 51 | // ============================================================ |
| 52 | |
| 53 | lineage_sdk_src = "sdk/src/java/lineageos" |
| 54 | lineage_sdk_internal_src = "sdk/src/java/org/lineageos/internal" |
| 55 | library_src = "lineage/lib/main/java" |
| 56 | |
| 57 | lineage_sdk_LOCAL_JAVA_LIBRARIES = [ |
| 58 | "android-support-annotations", |
| 59 | "android-support-v7-preference", |
| 60 | "android-support-v7-recyclerview", |
| 61 | "android-support-v14-preference", |
| 62 | ] |
| 63 | |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 64 | lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES = [ |
| 65 | "vendor.lineage.livedisplay-V2.0-java", |
| 66 | "vendor.lineage.touch-V1.0-java", |
| 67 | ] |
| 68 | |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 69 | // READ ME: ######################################################## |
| 70 | // |
| 71 | // When updating this list of aidl files, consider if that aidl is |
| 72 | // part of the SDK API. If it is, also add it to the list below that |
| 73 | // is preprocessed and distributed with the SDK. This list should |
| 74 | // not contain any aidl files for parcelables, but the one below should |
| 75 | // if you intend for 3rd parties to be able to send those objects |
| 76 | // across process boundaries. |
| 77 | // |
| 78 | // READ ME: ######################################################## |
| 79 | |
| 80 | java_library { |
| 81 | name: "org.lineageos.platform", |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 82 | static_libs: ["telephony-ext"] + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 83 | |
| 84 | libs: [ |
| 85 | "services", |
| 86 | "org.lineageos.hardware", |
| 87 | ] + lineage_sdk_LOCAL_JAVA_LIBRARIES, |
| 88 | |
| 89 | srcs: [ |
| 90 | lineage_sdk_src + "/**/*.java", |
| 91 | lineage_sdk_internal_src + "/**/*.java", |
| 92 | library_src + "/**/*.java", |
| 93 | lineage_sdk_src + "/**/I*.aidl", |
| 94 | lineage_sdk_internal_src + "/**/I*.aidl", |
| 95 | ], |
| 96 | |
| 97 | // Include aidl files from lineageos.app namespace as well as internal src aidl files |
| 98 | aidl: { |
| 99 | local_include_dirs: ["sdk/src/java"], |
| 100 | }, |
| 101 | } |
| 102 | |
| 103 | // Full target for use by platform apps |
| 104 | // ============================================================ |
| 105 | |
| 106 | java_library_static { |
| 107 | name: "org.lineageos.platform.internal", |
| 108 | required: ["services"], |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 109 | static_libs: ["telephony-ext"] + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 110 | libs: lineage_sdk_LOCAL_JAVA_LIBRARIES, |
| 111 | |
| 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 | |
| 129 | java_library_static { |
| 130 | name: "org.lineageos.platform.sdk", |
| 131 | required: ["services"], |
| 132 | libs: lineage_sdk_LOCAL_JAVA_LIBRARIES, |
Paul Keith | b49ed55 | 2019-01-18 17:58:26 +0100 | [diff] [blame] | 133 | static_libs: lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES, |
Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame] | 134 | |
| 135 | srcs: [ |
| 136 | lineage_sdk_src + "/**/*.java", |
| 137 | lineage_sdk_src + "/**/I*.aidl", |
| 138 | ], |
| 139 | |
| 140 | aidl: { |
| 141 | local_include_dirs: ["sdk/src/java"], |
| 142 | }, |
| 143 | } |