xref: /aosp_15_r20/external/antlr/Android.bp (revision 16467b971bd3e2009fad32dd79016f2c7e421deb)
1*16467b97STreehugger Robot// Copyright (C) 2011 The Android Open Source Project
2*16467b97STreehugger Robot//
3*16467b97STreehugger Robot// Licensed under the Apache License, Version 2.0 (the "License");
4*16467b97STreehugger Robot// you may not use this file except in compliance with the License.
5*16467b97STreehugger Robot// You may obtain a copy of the License at
6*16467b97STreehugger Robot//
7*16467b97STreehugger Robot//      http://www.apache.org/licenses/LICENSE-2.0
8*16467b97STreehugger Robot//
9*16467b97STreehugger Robot// Unless required by applicable law or agreed to in writing, software
10*16467b97STreehugger Robot// distributed under the License is distributed on an "AS IS" BASIS,
11*16467b97STreehugger Robot// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*16467b97STreehugger Robot// See the License for the specific language governing permissions and
13*16467b97STreehugger Robot// limitations under the License.
14*16467b97STreehugger Robot
15*16467b97STreehugger Robotpackage {
16*16467b97STreehugger Robot    default_applicable_licenses: ["external_antlr_license"],
17*16467b97STreehugger Robot}
18*16467b97STreehugger Robot
19*16467b97STreehugger Robot// Added automatically by a large-scale-change that took the approach of
20*16467b97STreehugger Robot// 'apply every license found to every target'. While this makes sure we respect
21*16467b97STreehugger Robot// every license restriction, it may not be entirely correct.
22*16467b97STreehugger Robot//
23*16467b97STreehugger Robot// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24*16467b97STreehugger Robot//
25*16467b97STreehugger Robot// Please consider splitting the single license below into multiple licenses,
26*16467b97STreehugger Robot// taking care not to lose any license_kind information, and overriding the
27*16467b97STreehugger Robot// default license using the 'licenses: [...]' property on targets as needed.
28*16467b97STreehugger Robot//
29*16467b97STreehugger Robot// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30*16467b97STreehugger Robot// to attach the license to, and including a comment whether the files may be
31*16467b97STreehugger Robot// used in the current project.
32*16467b97STreehugger Robot// See: http://go/android-license-faq
33*16467b97STreehugger Robotlicense {
34*16467b97STreehugger Robot    name: "external_antlr_license",
35*16467b97STreehugger Robot    visibility: [":__subpackages__"],
36*16467b97STreehugger Robot    license_kinds: [
37*16467b97STreehugger Robot        "SPDX-license-identifier-Apache-2.0",
38*16467b97STreehugger Robot        "SPDX-license-identifier-Artistic",
39*16467b97STreehugger Robot        "SPDX-license-identifier-BSD",
40*16467b97STreehugger Robot        "SPDX-license-identifier-FSFAP",
41*16467b97STreehugger Robot        "SPDX-license-identifier-MIT",
42*16467b97STreehugger Robot        "legacy_notice",
43*16467b97STreehugger Robot        "legacy_unencumbered",
44*16467b97STreehugger Robot    ],
45*16467b97STreehugger Robot    license_text: [
46*16467b97STreehugger Robot        "NOTICE",
47*16467b97STreehugger Robot    ],
48*16467b97STreehugger Robot}
49*16467b97STreehugger Robot
50*16467b97STreehugger Robotjava_library_host {
51*16467b97STreehugger Robot    name: "antlr-runtime",
52*16467b97STreehugger Robot    srcs: ["runtime/Java/src/main/java/**/*.java"],
53*16467b97STreehugger Robot    //Remove DOTTreeGenerator.java, so that we don't have the StringTemplate library as a dependency
54*16467b97STreehugger Robot    exclude_srcs: ["runtime/Java/src/main/java/org/antlr/runtime/tree/DOTTreeGenerator.java"],
55*16467b97STreehugger Robot    errorprone: {
56*16467b97STreehugger Robot        javacflags: [
57*16467b97STreehugger Robot            "-Xep:MissingOverride:OFF", // b/73499927
58*16467b97STreehugger Robot            "-Xep:EqualsHashCode:WARN",
59*16467b97STreehugger Robot        ],
60*16467b97STreehugger Robot    },
61*16467b97STreehugger Robot}
62