• 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// ...and prevent anyone from trying to do so:
31filegroup {
32    name: "external_tinyxml2_docs",
33    srcs: ["docs/**/*"],
34    visibility: ["//visibility:private"],
35}
36
37cc_library {
38    name: "libtinyxml2",
39    host_supported: true,
40    vendor_available: true,
41    product_available: true,
42    recovery_available: true,
43    vndk: {
44        enabled: true,
45    },
46
47    srcs: ["tinyxml2.cpp"],
48
49    cflags: [
50        "-Wall",
51        "-Werror",
52        "-Wno-implicit-fallthrough",
53        // tinyxml2.cpp line 436, 441, 446 have -Wimplicit-fallthrough.
54    ],
55
56    shared_libs: ["liblog"],
57
58    target: {
59        android: {
60            cflags: [
61                // LOG_TO_ANDROID_LOGCAT
62                "-DDEBUG",
63                "-DANDROID_NDK",
64            ],
65        },
66    },
67
68    export_include_dirs: ["."],
69}
70
71cc_test {
72    name: "tinyxml2-xmltest",
73    srcs: ["xmltest.cpp"],
74    shared_libs: ["libtinyxml2"],
75    data: [
76        "resources/**/*",
77    ],
78}
79
80sh_test {
81    name: "tinyxml2-tests",
82    src: "run-tinyxml2-tests-on-android.sh",
83    filename: "run-tinyxml2-tests-on-android.sh",
84    test_suites: ["general-tests"],
85    host_supported: true,
86    device_supported: false,
87    require_root: true,
88    target_required: ["tinyxml2-xmltest"],
89}
90