• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "external_icu_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    //   SPDX-license-identifier-BSD
22    //   SPDX-license-identifier-Unicode-DFS
23    default_applicable_licenses: ["external_icu_license"],
24}
25
26ndk_library {
27    name: "libicu",
28    symbol_file: "libicu.map.txt",
29    first_version: "31",
30    unversioned_until: "current",
31}
32
33ndk_headers {
34    name: "libicu_ndk_headers",
35    from: "ndk_headers",
36    to: "",
37    srcs: ["ndk_headers/**/*.h"],
38    license: ":icu_license",
39}
40
41cc_library_shared {
42    name: "libicu",
43    defaults: ["icu4c_defaults"],
44    host_supported: true,
45    native_bridge_supported: true,
46    export_include_dirs: ["ndk_headers"],
47    // The whole implementation comes from the intermediate library libicu_static because
48    // ndk_headers/ has symbol name collisions with the headers in libicuuc/libicui18n.
49    whole_static_libs: ["libicu_static"],
50    shared_libs: [
51        "libicuuc",
52        "libicui18n",
53    ],
54    apex_available: [
55        "com.android.i18n",
56    ],
57    stubs: {
58        symbol_file: "libicu.map.txt",
59        versions: ["31"],
60    },
61    target: {
62        android: {
63            version_script: "libicu.map.txt",
64        },
65        native_bridge: {
66            exclude_shared_libs: [
67                "libicuuc",
68                "libicui18n",
69            ],
70            shared_libs: [
71                "libnative_bridge_guest_libicuuc",
72                "libnative_bridge_guest_libicui18n",
73            ],
74        },
75    },
76}
77
78cc_library_shared {
79    name: "libicu_cts_stub",
80    defaults: ["icu4c_defaults"],
81    host_supported: false,
82    native_bridge_supported: false,
83    installable: false,
84    stem: "libicu",
85    export_include_dirs: ["cts_headers"],
86    // The whole implementation comes from the intermediate library libicu_static because
87    // ndk_headers/ has collision with the headers in libicuuc/libicui18n.
88    whole_static_libs: ["libicu_static"],
89    shared_libs: [
90        "libicuuc_cts_stub",
91        "libicui18n_cts_stub",
92    ],
93    target: {
94        android: {
95            version_script: "libicu.map.txt",
96        },
97    },
98}
99