Rashed Abdel-Tawab | 703249a | 2018-08-09 16:47:40 -0700 | [diff] [blame^] | 1 | // |
| 2 | // Copyright (C) 2018 The LineageOS Project |
| 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", |
| 20 | manifest: "lineage/res/AndroidManifest.xml", |
| 21 | |
| 22 | aaptflags: [ |
| 23 | "--auto-add-overlay", |
| 24 | "--private-symbols", |
| 25 | "org.lineageos.platform.internal", |
| 26 | |
| 27 | // Framework doesn't need versioning since it IS the platform. |
| 28 | "--no-auto-version", |
| 29 | |
| 30 | // Tell aapt to create "extending (non-application)" resource IDs, |
| 31 | // since these resources will be used by many apps. |
| 32 | "--allow-reserved-package-id", |
| 33 | // Use id 0x3f (one less than app id). |
| 34 | "--package-id", |
| 35 | "63", |
| 36 | ], |
| 37 | |
| 38 | resource_dirs: [ |
| 39 | "lineage/res/res", |
| 40 | "sdk/res/res" |
| 41 | ], |
| 42 | |
| 43 | // Create package-export.apk, which other packages can use to get |
| 44 | // PRODUCT-agnostic resource data like IDs and type definitions. |
| 45 | export_package_resources: true, |
| 46 | } |
| 47 | |
| 48 | |
| 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 | |
| 56 | lineage_sdk_LOCAL_JAVA_LIBRARIES = [ |
| 57 | "android-support-annotations", |
| 58 | "android-support-v7-preference", |
| 59 | "android-support-v7-recyclerview", |
| 60 | "android-support-v14-preference", |
| 61 | ] |
| 62 | |
| 63 | // READ ME: ######################################################## |
| 64 | // |
| 65 | // When updating this list of aidl files, consider if that aidl is |
| 66 | // part of the SDK API. If it is, also add it to the list below that |
| 67 | // is preprocessed and distributed with the SDK. This list should |
| 68 | // not contain any aidl files for parcelables, but the one below should |
| 69 | // if you intend for 3rd parties to be able to send those objects |
| 70 | // across process boundaries. |
| 71 | // |
| 72 | // READ ME: ######################################################## |
| 73 | |
| 74 | java_library { |
| 75 | name: "org.lineageos.platform", |
| 76 | static_libs: ["telephony-ext"], |
| 77 | |
| 78 | libs: [ |
| 79 | "services", |
| 80 | "org.lineageos.hardware", |
| 81 | ] + lineage_sdk_LOCAL_JAVA_LIBRARIES, |
| 82 | |
| 83 | srcs: [ |
| 84 | lineage_sdk_src + "/**/*.java", |
| 85 | lineage_sdk_internal_src + "/**/*.java", |
| 86 | library_src + "/**/*.java", |
| 87 | lineage_sdk_src + "/**/I*.aidl", |
| 88 | lineage_sdk_internal_src + "/**/I*.aidl", |
| 89 | ], |
| 90 | |
| 91 | // Include aidl files from lineageos.app namespace as well as internal src aidl files |
| 92 | aidl: { |
| 93 | local_include_dirs: ["sdk/src/java"], |
| 94 | }, |
| 95 | } |
| 96 | |
| 97 | // Full target for use by platform apps |
| 98 | // ============================================================ |
| 99 | |
| 100 | java_library_static { |
| 101 | name: "org.lineageos.platform.internal", |
| 102 | required: ["services"], |
| 103 | static_libs: ["telephony-ext"], |
| 104 | libs: lineage_sdk_LOCAL_JAVA_LIBRARIES, |
| 105 | |
| 106 | srcs: [ |
| 107 | lineage_sdk_src + "/**/*.java", |
| 108 | lineage_sdk_internal_src + "/**/*.java", |
| 109 | lineage_sdk_src + "/**/I*.aidl", |
| 110 | lineage_sdk_internal_src + "/**/I*.aidl", |
| 111 | ], |
| 112 | |
| 113 | aidl: { |
| 114 | local_include_dirs: ["sdk/src/java"], |
| 115 | }, |
| 116 | } |
| 117 | |
| 118 | // The SDK |
| 119 | // ============================================================ |
| 120 | |
| 121 | // Included aidl files from lineageos.app namespace |
| 122 | |
| 123 | java_library_static { |
| 124 | name: "org.lineageos.platform.sdk", |
| 125 | required: ["services"], |
| 126 | libs: lineage_sdk_LOCAL_JAVA_LIBRARIES, |
| 127 | |
| 128 | srcs: [ |
| 129 | lineage_sdk_src + "/**/*.java", |
| 130 | lineage_sdk_src + "/**/I*.aidl", |
| 131 | ], |
| 132 | |
| 133 | aidl: { |
| 134 | local_include_dirs: ["sdk/src/java"], |
| 135 | }, |
| 136 | } |