xref: /aosp_15_r20/external/icu/libandroidicuinit/Android.bp (revision 0e209d3975ff4a8c132096b14b0e9364a753506e)
1*0e209d39SAndroid Build Coastguard Worker// Copyright (C) 2019 The Android Open Source Project
2*0e209d39SAndroid Build Coastguard Worker//
3*0e209d39SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*0e209d39SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*0e209d39SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*0e209d39SAndroid Build Coastguard Worker//
7*0e209d39SAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
8*0e209d39SAndroid Build Coastguard Worker//
9*0e209d39SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*0e209d39SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*0e209d39SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*0e209d39SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*0e209d39SAndroid Build Coastguard Worker// limitations under the License.
14*0e209d39SAndroid Build Coastguard Worker
15*0e209d39SAndroid Build Coastguard Worker// A library of shared initialization code for use by libicuuc.so only.
16*0e209d39SAndroid Build Coastguard Workerpackage {
17*0e209d39SAndroid Build Coastguard Worker    default_team: "trendy_team_java_core_libraries",
18*0e209d39SAndroid Build Coastguard Worker    // See: http://go/android-license-faq
19*0e209d39SAndroid Build Coastguard Worker    // A large-scale-change added 'default_applicable_licenses' to import
20*0e209d39SAndroid Build Coastguard Worker    // all of the 'license_kinds' from "external_icu_license"
21*0e209d39SAndroid Build Coastguard Worker    // to get the below license kinds:
22*0e209d39SAndroid Build Coastguard Worker    //   SPDX-license-identifier-Apache-2.0
23*0e209d39SAndroid Build Coastguard Worker    default_applicable_licenses: ["external_icu_license"],
24*0e209d39SAndroid Build Coastguard Worker}
25*0e209d39SAndroid Build Coastguard Worker
26*0e209d39SAndroid Build Coastguard Workercc_library_static {
27*0e209d39SAndroid Build Coastguard Worker    name: "libandroidicuinit",
28*0e209d39SAndroid Build Coastguard Worker    host_supported: true, // for ART host testing.
29*0e209d39SAndroid Build Coastguard Worker    native_bridge_supported: true,
30*0e209d39SAndroid Build Coastguard Worker    srcs: ["*.cpp"],
31*0e209d39SAndroid Build Coastguard Worker    // Caution: Don't invoke the caller, e.g. openCommonData, from this library because it could
32*0e209d39SAndroid Build Coastguard Worker    //   cause an indefinite loop. This library interacts with libicuuc closely, but this library is
33*0e209d39SAndroid Build Coastguard Worker    //   stored in a separate directory to avoid a larger patch which could incur more works when
34*0e209d39SAndroid Build Coastguard Worker    //   updating from the upstream.
35*0e209d39SAndroid Build Coastguard Worker    header_libs: ["libicuuc_headers"],
36*0e209d39SAndroid Build Coastguard Worker    cflags: [
37*0e209d39SAndroid Build Coastguard Worker        "-Wall",
38*0e209d39SAndroid Build Coastguard Worker        "-Werror",
39*0e209d39SAndroid Build Coastguard Worker    ],
40*0e209d39SAndroid Build Coastguard Worker    export_include_dirs: ["include"],
41*0e209d39SAndroid Build Coastguard Worker    target: {
42*0e209d39SAndroid Build Coastguard Worker        android: {
43*0e209d39SAndroid Build Coastguard Worker            cflags: [
44*0e209d39SAndroid Build Coastguard Worker                // -DANDROID_LINK_SHARED_ICU4C to enable access to the full ICU4C.
45*0e209d39SAndroid Build Coastguard Worker                // See external/icu/android_icu4c/include/uconfig_local.h
46*0e209d39SAndroid Build Coastguard Worker                // for more information.
47*0e209d39SAndroid Build Coastguard Worker                "-DANDROID_LINK_SHARED_ICU4C",
48*0e209d39SAndroid Build Coastguard Worker            ],
49*0e209d39SAndroid Build Coastguard Worker            shared_libs: [
50*0e209d39SAndroid Build Coastguard Worker                "libbase",
51*0e209d39SAndroid Build Coastguard Worker                "liblog",
52*0e209d39SAndroid Build Coastguard Worker            ],
53*0e209d39SAndroid Build Coastguard Worker        },
54*0e209d39SAndroid Build Coastguard Worker    },
55*0e209d39SAndroid Build Coastguard Worker    apex_available: [
56*0e209d39SAndroid Build Coastguard Worker        "com.android.i18n",
57*0e209d39SAndroid Build Coastguard Worker    ],
58*0e209d39SAndroid Build Coastguard Worker    visibility: [
59*0e209d39SAndroid Build Coastguard Worker        "//external/icu/icu4c/source/common",
60*0e209d39SAndroid Build Coastguard Worker    ],
61*0e209d39SAndroid Build Coastguard Worker}
62