xref: /aosp_15_r20/external/javaparser/Android.bp (revision f0340d8e30c177f9125cc02e7b512609509b136e)
1// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// build javaparser jar
16// ============================================================
17
18package {
19    default_applicable_licenses: ["external_javaparser_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//
36// large-scale-change included anything that looked like it might be a license
37// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
38//
39// Please consider removing redundant or irrelevant files from 'license_text:'.
40// See: http://go/android-license-faq
41license {
42    name: "external_javaparser_license",
43    visibility: [":__subpackages__"],
44    license_kinds: [
45        "SPDX-license-identifier-Apache-2.0",
46        "SPDX-license-identifier-GPL",
47        "SPDX-license-identifier-GPL-3.0",
48        "SPDX-license-identifier-LGPL",
49        "SPDX-license-identifier-LGPL-2.1",
50        "SPDX-license-identifier-LGPL-3.0",
51    ],
52    license_text: [
53        "LICENSE",
54        "LICENSE.APACHE",
55        "LICENSE.GPL",
56        "LICENSE.LGPL",
57    ],
58}
59
60java_library_host {
61    name: "javaparser",
62
63    srcs: [
64        "javaparser-core/src/main/java/**/*.java",
65        "javaparser-core/src/main/javacc-support/**/*.java",
66        "javaparser-core/generated-sources/**/*.java",
67    ],
68
69    errorprone: {
70        javacflags: [
71            "-Xep:IdentityBinaryExpression:WARN",
72            "-Xep:DangerousLiteralNull:WARN",
73            "-Xep:DoubleBraceInitialization:WARN",
74        ],
75    },
76}
77
78java_library_host {
79    name: "javaparser-symbol-solver",
80
81    srcs: [
82        "javaparser-symbol-solver-core/src/main/java/**/*.java",
83        "javaparser-symbol-solver-logic/src/main/java/**/*.java",
84        "javaparser-symbol-solver-model/src/main/java/**/*.java",
85    ],
86
87    static_libs: [
88        "guava",
89        "javaparser",
90        "javassist",
91    ],
92    errorprone: {
93        javacflags: ["-Xep:UnicodeInCode:WARN"]
94    }
95}
96