Skip to content

Commit 844b5d2

Browse files
benjaminpcopybara-github
authored andcommitted
Remove deprecated targets from jdk.BUILD.
These have been deprecated for more than 4 years (fc8a927). Closes #17098. PiperOrigin-RevId: 516615484 Change-Id: Ia1db98a885a37aa6169847e54cf54ecbfcbe3179
1 parent 96d73da commit 844b5d2

2 files changed

Lines changed: 11 additions & 179 deletions

File tree

tools/jdk/BUILD.tools

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,6 @@ cc_library(
116116
}),
117117
)
118118

119-
alias(
120-
name = "java",
121-
actual = "@local_jdk//:java",
122-
)
123-
124-
alias(
125-
name = "jar",
126-
actual = "@local_jdk//:jar",
127-
)
128-
129-
alias(
130-
name = "javadoc",
131-
actual = "@local_jdk//:javadoc",
132-
)
133-
134119
[
135120
(
136121
alias(
@@ -274,20 +259,6 @@ alias(
274259
actual = "@remote_java_tools//:proguard",
275260
)
276261

277-
BOOTCLASS_JARS = [
278-
"rt.jar",
279-
"resources.jar",
280-
"jsse.jar",
281-
"jce.jar",
282-
"charsets.jar",
283-
]
284-
285-
# TODO(cushon): this isn't compatible with JDK 9
286-
alias(
287-
name = "bootclasspath",
288-
actual = "@local_jdk//:bootclasspath",
289-
)
290-
291262
alias(
292263
name = "jre",
293264
actual = "@local_jdk//:jre",

tools/jdk/jdk.BUILD

Lines changed: 11 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -1,157 +1,24 @@
1-
load("@rules_java//java:defs.bzl", "java_import", "java_runtime")
1+
load("@rules_java//java:defs.bzl", "java_runtime")
22

33
package(default_visibility = ["//visibility:public"])
44

55
exports_files(["BUILD.bazel"])
66

7-
DEPRECATION_MESSAGE = ("Don't depend on targets in the JDK workspace;" +
8-
" use @bazel_tools//tools/jdk:current_java_runtime instead" +
9-
" (see https://github.com/bazelbuild/bazel/issues/5594)")
10-
11-
filegroup(
12-
name = "jni_header",
13-
srcs = ["include/jni.h"],
14-
deprecation = DEPRECATION_MESSAGE,
15-
)
16-
17-
filegroup(
18-
name = "jni_md_header-darwin",
19-
srcs = ["include/darwin/jni_md.h"],
20-
deprecation = DEPRECATION_MESSAGE,
21-
)
22-
23-
filegroup(
24-
name = "jni_md_header-linux",
25-
srcs = ["include/linux/jni_md.h"],
26-
deprecation = DEPRECATION_MESSAGE,
27-
)
28-
29-
filegroup(
30-
name = "jni_md_header-freebsd",
31-
srcs = ["include/freebsd/jni_md.h"],
32-
deprecation = DEPRECATION_MESSAGE,
33-
)
34-
35-
filegroup(
36-
name = "jni_md_header-openbsd",
37-
srcs = ["include/openbsd/jni_md.h"],
38-
deprecation = DEPRECATION_MESSAGE,
39-
)
40-
41-
filegroup(
42-
name = "jni_md_header-windows",
43-
srcs = ["include/win32/jni_md.h"],
44-
deprecation = DEPRECATION_MESSAGE,
45-
)
46-
47-
filegroup(
48-
name = "java",
49-
srcs = select({
50-
":windows": ["bin/java.exe"],
51-
"//conditions:default": ["bin/java"],
52-
}),
53-
data = [":jdk"],
54-
deprecation = DEPRECATION_MESSAGE,
55-
)
56-
57-
filegroup(
58-
name = "jar",
59-
srcs = select({
60-
":windows": ["bin/jar.exe"],
61-
"//conditions:default": ["bin/jar"],
62-
}),
63-
data = [":jdk"],
64-
deprecation = DEPRECATION_MESSAGE,
65-
)
66-
67-
filegroup(
68-
name = "javac",
69-
srcs = select({
70-
":windows": ["bin/javac.exe"],
71-
"//conditions:default": ["bin/javac"],
72-
}),
73-
data = [":jdk"],
74-
deprecation = DEPRECATION_MESSAGE,
75-
)
76-
77-
filegroup(
78-
name = "javadoc",
79-
srcs = select({
80-
":windows": ["bin/javadoc.exe"],
81-
"//conditions:default": ["bin/javadoc"],
82-
}),
83-
data = [":jdk"],
84-
deprecation = DEPRECATION_MESSAGE,
85-
)
86-
877
filegroup(
88-
name = "xjc",
89-
srcs = ["bin/xjc"],
90-
deprecation = DEPRECATION_MESSAGE,
91-
)
92-
93-
filegroup(
94-
name = "wsimport",
95-
srcs = ["bin/wsimport"],
96-
deprecation = DEPRECATION_MESSAGE,
97-
)
98-
99-
BOOTCLASS_JARS = [
100-
"rt.jar",
101-
"resources.jar",
102-
"jsse.jar",
103-
"jce.jar",
104-
"charsets.jar",
105-
]
106-
107-
# TODO(cushon): this isn't compatible with JDK 9
108-
filegroup(
109-
name = "bootclasspath",
110-
srcs = ["jre/lib/%s" % jar for jar in BOOTCLASS_JARS],
111-
deprecation = DEPRECATION_MESSAGE,
112-
)
113-
114-
filegroup(
115-
name = "jre-bin",
116-
srcs = select({
8+
name = "jre",
9+
srcs = glob(
10+
[
11+
"jre/bin/**",
12+
"jre/lib/**",
13+
],
14+
allow_empty = True,
11715
# In some configurations, Java browser plugin is considered harmful and
11816
# common antivirus software blocks access to npjp2.dll interfering with Bazel,
11917
# so do not include it in JRE on Windows.
120-
":windows": glob(
121-
["jre/bin/**"],
122-
allow_empty = True,
123-
exclude = ["jre/bin/plugin2/**"],
124-
),
125-
"//conditions:default": glob(
126-
["jre/bin/**"],
127-
allow_empty = True,
128-
),
129-
}),
130-
deprecation = DEPRECATION_MESSAGE,
131-
)
132-
133-
filegroup(
134-
name = "jre-lib",
135-
srcs = glob(
136-
["jre/lib/**"],
137-
allow_empty = True,
18+
exclude = ["jre/bin/plugin2/**"],
13819
),
13920
)
14021

141-
filegroup(
142-
name = "jre",
143-
srcs = [":jre-default"],
144-
)
145-
146-
filegroup(
147-
name = "jre-default",
148-
srcs = [
149-
":jre-bin",
150-
":jre-lib",
151-
],
152-
deprecation = DEPRECATION_MESSAGE,
153-
)
154-
15522
filegroup(
15623
name = "jdk-bin",
15724
srcs = glob(
@@ -162,7 +29,7 @@ filegroup(
16229
),
16330
)
16431

165-
#This folder holds security policies
32+
# This folder holds security policies.
16633
filegroup(
16734
name = "jdk-conf",
16835
srcs = glob(
@@ -198,12 +65,6 @@ java_runtime(
19865
":jdk-conf",
19966
":jdk-include",
20067
":jdk-lib",
201-
":jre-default",
68+
":jre",
20269
],
20370
)
204-
205-
config_setting(
206-
name = "windows",
207-
constraint_values = ["@platforms//os:windows"],
208-
visibility = ["//visibility:private"],
209-
)

0 commit comments

Comments
 (0)