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