Victor Chang | 2b8ba1e | 2020-08-19 18:14:25 +0100 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | ndk_library { |
| 16 | name: "libicu", |
| 17 | symbol_file: "libicu.map.txt", |
| 18 | first_version: "31", |
| 19 | unversioned_until: "current", |
| 20 | } |
| 21 | |
| 22 | ndk_headers { |
| 23 | name: "libicu_ndk_headers", |
| 24 | from: "ndk_headers", |
| 25 | to: "", |
| 26 | srcs: ["ndk_headers/**/*.h"], |
| 27 | license: ":icu_license", |
| 28 | } |
| 29 | |
| 30 | cc_library_shared { |
| 31 | name: "libicu", |
| 32 | defaults: ["icu4c_defaults"], |
| 33 | host_supported: true, |
| 34 | native_bridge_supported: true, |
| 35 | export_include_dirs: ["ndk_headers"], |
| 36 | // The whole implementation comes from the intermediate library libicu_static because |
| 37 | // ndk_headers/ has symbol name collisions with the headers in libicuuc/libicui18n. |
| 38 | whole_static_libs: ["libicu_static"], |
| 39 | shared_libs: [ |
| 40 | "libicuuc", |
| 41 | "libicui18n", |
| 42 | ], |
| 43 | apex_available: [ |
| 44 | "com.android.i18n", |
| 45 | ], |
Victor Chang | dbc59d6 | 2020-09-10 17:49:56 +0100 | [diff] [blame] | 46 | stubs: { |
| 47 | symbol_file: "libicu.map.txt", |
| 48 | versions: ["31"], |
| 49 | }, |
Victor Chang | 2b8ba1e | 2020-08-19 18:14:25 +0100 | [diff] [blame] | 50 | target: { |
| 51 | android: { |
| 52 | version_script: "libicu.map.txt", |
| 53 | }, |
| 54 | }, |
| 55 | } |
Victor Chang | 7322950 | 2020-09-17 13:39:19 +0100 | [diff] [blame^] | 56 | |
| 57 | cc_library_shared { |
| 58 | name: "libicu_cts_stub", |
| 59 | defaults: ["icu4c_defaults"], |
| 60 | host_supported: false, |
| 61 | native_bridge_supported: false, |
| 62 | installable: false, |
| 63 | stem: "libicu", |
| 64 | export_include_dirs: ["cts_headers"], |
| 65 | // The whole implementation comes from the intermediate library libicu_static because |
| 66 | // ndk_headers/ has collision with the headers in libicuuc/libicui18n. |
| 67 | whole_static_libs: ["libicu_static"], |
| 68 | shared_libs: [ |
| 69 | "libicuuc_cts_stub", |
| 70 | "libicui18n_cts_stub", |
| 71 | ], |
| 72 | target: { |
| 73 | android: { |
| 74 | version_script: "libicu.map.txt", |
| 75 | }, |
| 76 | }, |
| 77 | } |