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 | }, |
Victor Khimenko | f382749 | 2020-10-09 17:03:42 +0200 | [diff] [blame] | 54 | native_bridge: { |
| 55 | exclude_shared_libs: [ |
| 56 | "libicuuc", |
| 57 | "libicui18n", |
| 58 | ], |
| 59 | shared_libs: [ |
| 60 | "libnative_bridge_guest_libicuuc", |
| 61 | "libnative_bridge_guest_libicui18n", |
| 62 | ], |
| 63 | }, |
Victor Chang | 2b8ba1e | 2020-08-19 18:14:25 +0100 | [diff] [blame] | 64 | }, |
| 65 | } |
Victor Chang | 7322950 | 2020-09-17 13:39:19 +0100 | [diff] [blame] | 66 | |
| 67 | cc_library_shared { |
| 68 | name: "libicu_cts_stub", |
| 69 | defaults: ["icu4c_defaults"], |
| 70 | host_supported: false, |
| 71 | native_bridge_supported: false, |
| 72 | installable: false, |
| 73 | stem: "libicu", |
| 74 | export_include_dirs: ["cts_headers"], |
| 75 | // The whole implementation comes from the intermediate library libicu_static because |
| 76 | // ndk_headers/ has collision with the headers in libicuuc/libicui18n. |
| 77 | whole_static_libs: ["libicu_static"], |
| 78 | shared_libs: [ |
| 79 | "libicuuc_cts_stub", |
| 80 | "libicui18n_cts_stub", |
| 81 | ], |
| 82 | target: { |
| 83 | android: { |
| 84 | version_script: "libicu.map.txt", |
| 85 | }, |
| 86 | }, |
| 87 | } |