blob: 94eb8fc6b615d8f423902eee442347ec4547bb12 [file] [log] [blame]
Fedor Kudasov37f980f2022-02-10 12:25:08 +00001//
2// Copyright (C) 2022 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
17// Build NullAway from sources for the platform
18//
19// Note: this is only intended to be used for the platform development. This is *not* intended
20// to be used in the SDK where apps can use the official jacoco release.
21package {
22 default_applicable_licenses: ["external_nullaway_license"],
23}
24
25// See: http://go/android-license-faq
26license {
27 name: "external_nullaway_license",
28 visibility: [":__subpackages__"],
29 license_kinds: [
30 "SPDX-license-identifier-Apache-2.0",
31 "SPDX-license-identifier-GPL-2.0-with-classpath-exception",
32 "SPDX-license-identifier-MIT",
33 ],
34 license_text: [
35 "LICENSE.txt",
36 "LICENSE",
37 "NOTICE",
38 ],
39}
40
41java_plugin {
42 name: "nullaway_plugin",
43
44 static_libs: [
45 "nullaway_lib",
46 ],
47}
48
49java_library_host {
50 name: "nullaway_lib",
51
52 srcs: ["nullaway/src/**/*.java"],
53
54 exclude_srcs: ["nullaway/src/test/**/*.java"],
55
56 static_libs: [
57 "guava",
58 "//external/error_prone:error_prone_checkerframework_dataflow_nullaway",
59 "//external/error_prone:error_prone_core",
60 ],
61
62 libs: [
63 "auto_service_annotations",
64 "auto_value_annotations",
65 ],
66
67 plugins: [
68 "auto_service_plugin",
69 "auto_value_plugin",
70 ],
71
72 javacflags: [
73 "--add-modules=jdk.compiler",
74 "--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
75 "--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
76 "--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
77 "--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
78 "--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
79 "--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
80 "--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
81 ],
82}