• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_tinyxml2_license"],
3}
4
5license {
6    name: "external_tinyxml2_license",
7    visibility: [":__subpackages__"],
8    license_kinds: [
9        "SPDX-license-identifier-BSD",
10        "SPDX-license-identifier-MIT",
11        "SPDX-license-identifier-Zlib",
12        "legacy_unencumbered",
13    ],
14    license_text: [
15        "LICENSE.txt",
16        "NOTICE",
17    ],
18}
19
20// The jquery stuff in docs/ is a bit ambiguous with its use of and/or when talking about the GPL,
21// so let's just make it clear that we don't use any of that stuff anyway...
22license {
23    name: "external_tinyxml2_docs_license",
24    license_kinds: ["SPDX-license-identifier-GPL"],
25    license_text: [
26        "LICENSE.txt",
27        "NOTICE",
28    ],
29}
30
31// ...and prevent anyone from trying to do so:
32filegroup {
33    name: "external_tinyxml2_docs",
34    srcs: ["docs/**/*"],
35    visibility: ["//visibility:private"],
36}
37
38cc_library {
39    name: "libtinyxml2",
40    host_supported: true,
41    vendor_available: true,
42    product_available: true,
43    recovery_available: true,
44    vndk: {
45        enabled: true,
46    },
47
48    srcs: ["tinyxml2.cpp"],
49
50    cflags: [
51        "-Wall",
52        "-Werror",
53        "-Wno-implicit-fallthrough",
54        // tinyxml2.cpp line 436, 441, 446 have -Wimplicit-fallthrough.
55    ],
56
57    shared_libs: ["liblog"],
58
59    target: {
60        android: {
61            cflags: [
62                // LOG_TO_ANDROID_LOGCAT
63                "-DDEBUG",
64                "-DANDROID_NDK",
65            ],
66        },
67        windows: {
68            enabled: true,
69            shared: {
70                enabled: false,
71            },
72        },
73    },
74
75    export_include_dirs: ["."],
76
77    min_sdk_version: "S",
78
79    apex_available: [
80        "com.android.art",
81        "com.android.art.debug",
82        "com.android.btservices",
83        "com.android.runtime", // used by linkerconfig
84        "//apex_available:platform", // For odsign.
85    ],
86}
87
88cc_test {
89    name: "tinyxml2-xmltest",
90    srcs: ["xmltest.cpp"],
91    shared_libs: ["libtinyxml2"],
92    data: [
93        "resources/**/*",
94    ],
95}
96
97sh_test {
98    name: "tinyxml2-tests",
99    src: "run-tinyxml2-tests-on-android.sh",
100    filename: "run-tinyxml2-tests-on-android.sh",
101    test_suites: ["general-tests"],
102    host_supported: true,
103    device_supported: false,
104    require_root: true,
105    target_required: ["tinyxml2-xmltest"],
106}
107