• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2011 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_visibility: ["//visibility:private"],
19    default_applicable_licenses: ["external_apache-xml_license"],
20}
21
22// Added automatically by a large-scale-change that took the approach of
23// 'apply every license found to every target'. While this makes sure we respect
24// every license restriction, it may not be entirely correct.
25//
26// e.g. GPL in an MIT project might only apply to the contrib/ directory.
27//
28// Please consider splitting the single license below into multiple licenses,
29// taking care not to lose any license_kind information, and overriding the
30// default license using the 'licenses: [...]' property on targets as needed.
31//
32// For unused files, consider creating a 'fileGroup' with "//visibility:private"
33// to attach the license to, and including a comment whether the files may be
34// used in the current project.
35// See: http://go/android-license-faq
36license {
37    name: "external_apache-xml_license",
38    visibility: [":__subpackages__"],
39    license_kinds: [
40        "SPDX-license-identifier-Apache-2.0",
41        "SPDX-license-identifier-W3C",
42    ],
43    license_text: [
44        "NOTICE",
45    ],
46}
47
48// The set of files that contribute to APIs.
49// Generally, apache-xml source files are not marked with @hide so we add them
50// one-by-one after having done so.
51filegroup {
52    name: "apache-xml_api_files",
53    visibility: ["//libcore"],
54    srcs: [],
55}
56
57java_library {
58    name: "apache-xml",
59    visibility: [
60        "//art/build/apex",
61        "//art/build/sdk",
62        "//art/tools/ahat",
63        "//art/tools/fuzzer",
64        "//libcore",
65        "//packages/modules/ArtPrebuilt",
66    ],
67    apex_available: [
68        "com.android.art",
69        "com.android.art.debug",
70    ],
71    srcs: ["src/main/java/**/*.java"],
72    java_resource_dirs: ["src/main/java"],
73    exclude_java_resources: ["src/main/java/**/*.src"],
74
75    installable: true,
76    hostdex: true,
77    errorprone: {
78        javacflags: [
79            "-Xep:MissingOverride:OFF",
80            "-Xep:LockOnBoxedPrimitive:WARN",
81        ],
82    },
83    lint: {
84        warning_checks: ["SuspiciousIndentation"],
85    },
86
87    optimize: {
88        enabled: true,
89        shrink: false,
90        optimize: false,
91        obfuscate: false,
92        proguard_compatibility: false,
93        ignore_warnings: false,
94    },
95
96    sdk_version: "none",
97    system_modules: "core-all-system-modules",
98    min_sdk_version: "31",
99}
100
101java_library_static {
102    name: "apache-xml-tests",
103    visibility: [
104        "//libcore",
105        "//packages/modules/ArtPrebuilt",
106    ],
107    srcs: [
108        "test/android_src/**/*.java",
109        "test/java/src/**/*.java",
110        "test/tests/bugzilla/**/*.java",
111        "test/tests/extensions/java/**/*.java",
112        // org.apache.xalan.trace package in xalan-java has to be imported because
113        // the test version is 2.7.3 while the implementation version is 2_7_1.
114        "test/trace-src/org/apache/xalan/trace/**/*.java",
115    ],
116    exclude_srcs: [
117        // The following java files fail to build.
118        "test/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.java",
119        "test/java/src/org/apache/qetest/xsl/XSLTestAntTask.java",
120        "test/java/src/org/apache/qetest/xsl/XsltcTestsTask.java",
121        "test/java/src/org/apache/qetest/xslwrapper/XTWrapper.java",
122        "test/java/src/org/apache/qetest/xslwrapper/XsltcMainWrapper.java",
123        "test/tests/bugzilla/Bugzilla1110.java",
124        "test/tests/bugzilla/Bugzilla1288.java",
125        "test/tests/bugzilla/Bugzilla6181.java",
126        "test/tests/extensions/java/javaElem01.java",
127        "test/tests/extensions/java/javaSample4.java",
128        "test/java/src/org/apache/qetest/xalanj2/TraceListenerTest.java",
129        "test/java/src/org/apache/qetest/xslwrapper/XalanProcessWrapper.java",
130        "test/tests/bugzilla/BugzillaNodeInfo.java",
131    ],
132    java_resource_dirs: [
133        "test/tests",
134        "test/java/xdocs",
135    ],
136    // soong_zip doesn't accept this file, likely due to unescaped space characters.
137    exclude_java_resources: ["test/tests/conf-gold/output/Test 31 Gif.gif"],
138
139    errorprone: {
140        javacflags: [
141            "-Xep:MissingOverride:OFF",
142            "-Xep:LockOnBoxedPrimitive:WARN",
143        ],
144    },
145    static_libs: [
146        "apache-xml-jtidy-prebuilt",
147    ],
148    libs: [
149        "apache-xml",
150        "junit",
151        "platform-test-annotations",
152    ],
153    sdk_version: "none",
154    system_modules: "core-all-system-modules",
155}
156
157java_import {
158    name: "apache-xml-jtidy-prebuilt",
159    jars: ["test/tools/jtidy-1.0.3.jar"],
160}
161