blob: 83024413562e5c9a6f897e60e46d7440317df3de [file] [log] [blame]
Bob Badour979b4da2021-02-12 14:51:15 -08001package {
2 default_applicable_licenses: ["external_google-java-format_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20 name: "external_google-java-format_license",
21 visibility: [":__subpackages__"],
22 license_kinds: [
23 "SPDX-license-identifier-Apache-2.0",
24 "SPDX-license-identifier-BSD",
25 "SPDX-license-identifier-MIT",
26 "SPDX-license-identifier-NCSA",
27 ],
28 license_text: [
29 "LICENSE",
30 ],
31}
32
Colin Cross7aef6bc2020-06-17 20:25:12 -070033java_library_host {
34 name: "google_java_format_android_annotation_stubs",
35 srcs: ["android-annotation-stubs/src/**/*.java"],
36}
37
38filegroup {
39 name: "google_java_format_main_srcs",
40 srcs: [
41 "core/src/main/java/com/google/googlejavaformat/java/Main.java",
42 "core/src/main/java/com/google/googlejavaformat/java/UsageException.java",
43 ],
44}
45
46java_library_host {
47 name: "google_java_format",
48 srcs: ["core/src/main/java/**/*.java"],
49 exclude_srcs: [
50 ":google_java_format_main_srcs",
51 "core/src/main/java/com/google/googlejavaformat/java/java14/Java14InputAstVisitor.java",
Colin Crossef76c3a2022-03-04 22:43:28 -080052 "core/src/main/java/com/google/googlejavaformat/java/GoogleJavaFormatToolProvider.java",
Colin Cross7aef6bc2020-06-17 20:25:12 -070053 ],
54 libs: [
55 "error_prone_annotations",
56 "google_java_format_android_annotation_stubs",
57 "guava",
Colin Crossef76c3a2022-03-04 22:43:28 -080058 "auto_service_annotations",
59 "auto_value_annotations",
Colin Cross7aef6bc2020-06-17 20:25:12 -070060 ],
Colin Crossef76c3a2022-03-04 22:43:28 -080061 plugins: [
62 "auto_oneof_plugin",
63 "auto_service_plugin",
64 "auto_value_plugin",
Colin Cross7aef6bc2020-06-17 20:25:12 -070065 ],
66 javacflags: [
67 "--add-modules=jdk.compiler",
68 "--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
69 "--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
70 "--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
71 "--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
72 "--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
73 "--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
74 "--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
75 ],
76}