Bob Badour | 228c854 | 2021-02-11 17:35:17 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["external_tinyxml2_license"], |
| 3 | } |
| 4 | |
| 5 | license { |
| 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... |
| 22 | license { |
| 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: |
| 31 | filegroup { |
| 32 | name: "external_tinyxml2_docs", |
| 33 | srcs: ["docs/**/*"], |
| 34 | visibility: ["//visibility:private"], |
| 35 | } |
| 36 | |
Jaekyun Seok | 4aef71b | 2016-11-29 06:50:26 +0900 | [diff] [blame] | 37 | cc_library { |
Colin Cross | da559c7 | 2016-07-12 11:12:29 -0700 | [diff] [blame] | 38 | name: "libtinyxml2", |
| 39 | host_supported: true, |
Jayant Chowdhary | 5c495c4 | 2017-05-16 14:22:14 -0700 | [diff] [blame] | 40 | vendor_available: true, |
Justin Yun | a564253 | 2020-11-11 18:26:17 +0900 | [diff] [blame] | 41 | product_available: true, |
Yifan Hong | a350384 | 2018-07-16 15:20:06 -0700 | [diff] [blame] | 42 | recovery_available: true, |
Justin Yun | d3ab274 | 2017-07-24 15:19:44 +0900 | [diff] [blame] | 43 | vndk: { |
| 44 | enabled: true, |
| 45 | }, |
Colin Cross | da559c7 | 2016-07-12 11:12:29 -0700 | [diff] [blame] | 46 | |
| 47 | srcs: ["tinyxml2.cpp"], |
| 48 | |
Elliott Hughes | 5e6f75e | 2018-01-12 13:01:08 -0800 | [diff] [blame] | 49 | cflags: [ |
| 50 | "-Wall", |
| 51 | "-Werror", |
Chih-Hung Hsieh | f6dd7be | 2018-09-04 14:33:39 -0700 | [diff] [blame] | 52 | "-Wno-implicit-fallthrough", |
| 53 | // tinyxml2.cpp line 436, 441, 446 have -Wimplicit-fallthrough. |
Elliott Hughes | 5e6f75e | 2018-01-12 13:01:08 -0800 | [diff] [blame] | 54 | ], |
Chih-Hung Hsieh | 664df7a | 2017-09-29 11:31:57 -0700 | [diff] [blame] | 55 | |
Steven Moreland | e5ae299 | 2017-07-14 11:54:16 -0700 | [diff] [blame] | 56 | shared_libs: ["liblog"], |
| 57 | |
Colin Cross | da559c7 | 2016-07-12 11:12:29 -0700 | [diff] [blame] | 58 | target: { |
| 59 | android: { |
| 60 | cflags: [ |
| 61 | // LOG_TO_ANDROID_LOGCAT |
| 62 | "-DDEBUG", |
| 63 | "-DANDROID_NDK", |
| 64 | ], |
| 65 | }, |
| 66 | }, |
Elliott Hughes | 657af2b | 2016-09-12 15:34:42 -0700 | [diff] [blame] | 67 | |
| 68 | export_include_dirs: ["."], |
Sorin Basca | 6c0d2ff | 2021-05-27 12:35:35 +0000 | [diff] [blame] | 69 | |
| 70 | min_sdk_version: "S", |
| 71 | |
| 72 | apex_available: [ |
| 73 | "com.android.art", |
| 74 | "com.android.art.debug", |
William Escande | ae08b20 | 2022-03-02 20:25:45 +0100 | [diff] [blame] | 75 | "com.android.bluetooth", |
Sorin Basca | 6c0d2ff | 2021-05-27 12:35:35 +0000 | [diff] [blame] | 76 | "//apex_available:platform", // For odsign. |
| 77 | ], |
Colin Cross | da559c7 | 2016-07-12 11:12:29 -0700 | [diff] [blame] | 78 | } |
Elliott Hughes | 5e6f75e | 2018-01-12 13:01:08 -0800 | [diff] [blame] | 79 | |
| 80 | cc_test { |
Elliott Hughes | 5bd3512 | 2020-10-22 16:48:49 -0700 | [diff] [blame] | 81 | name: "tinyxml2-xmltest", |
Elliott Hughes | 5e6f75e | 2018-01-12 13:01:08 -0800 | [diff] [blame] | 82 | srcs: ["xmltest.cpp"], |
| 83 | shared_libs: ["libtinyxml2"], |
Elliott Hughes | 5e6f75e | 2018-01-12 13:01:08 -0800 | [diff] [blame] | 84 | data: [ |
Elliott Hughes | fc1d724 | 2018-04-25 12:19:39 -0700 | [diff] [blame] | 85 | "resources/**/*", |
Elliott Hughes | 5e6f75e | 2018-01-12 13:01:08 -0800 | [diff] [blame] | 86 | ], |
| 87 | } |
Elliott Hughes | 5bd3512 | 2020-10-22 16:48:49 -0700 | [diff] [blame] | 88 | |
| 89 | sh_test { |
| 90 | name: "tinyxml2-tests", |
| 91 | src: "run-tinyxml2-tests-on-android.sh", |
| 92 | filename: "run-tinyxml2-tests-on-android.sh", |
| 93 | test_suites: ["general-tests"], |
| 94 | host_supported: true, |
| 95 | device_supported: false, |
| 96 | require_root: true, |
| 97 | target_required: ["tinyxml2-xmltest"], |
| 98 | } |