blob: 14838ae3771344a5a48b2554d59289074c1a4bdb [file] [log] [blame]
David L. Jonesd76f8c82022-04-22 16:58:16 -07001load("@rules_pkg//:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
2
Tomo Suzuki2fd29b02023-06-12 09:46:47 -07003# Run Linkage Monitor
4sh_test(
5 name = "linkage_monitor",
6 size = "large",
Tomo Suzuki2fd29b02023-06-12 09:46:47 -07007 srcs = [
8 ":linkage_monitor.sh",
9 ],
10 data = [
11 # Making the Maven modules available in the sandbox
12 ":core",
13 ":kotlin",
14 ":kotlin-lite",
15 ":lite",
16 ":util",
17 "//:protoc",
18 # Making this test depends on the code change in core and util
19 "//java/core:dist_files",
20 "//java/util",
21 ] + glob([
22 "pom.xml",
23 "*/pom.xml",
Protobuf Team Botb1f92b72023-07-13 12:26:38 -070024 "test/linkage-monitor-check-bom/pom.xml",
Tomo Suzuki2fd29b02023-06-12 09:46:47 -070025 ]),
Adam Cozzette501ecec2023-09-26 14:36:20 -070026 tags = [
27 # Exclude this target from wildcard expansion (//...) because it may
28 # take unnecessary time.
29 "manual",
30 ],
Tomo Suzuki2fd29b02023-06-12 09:46:47 -070031)
32
Derek Perezbc45f922021-04-20 11:36:32 -070033test_suite(
Derek Perezc6844342021-06-28 14:38:25 -070034 name = "tests",
35 tests = [
36 "//java/core:tests",
Deanna Garciadfd99e72022-01-12 21:54:30 +000037 "//java/kotlin:tests",
38 "//java/kotlin-lite:tests",
Derek Perezc6844342021-06-28 14:38:25 -070039 "//java/lite:tests",
40 "//java/util:tests",
41 ],
Derek Perezbc45f922021-04-20 11:36:32 -070042)
Derek Perezc6844342021-06-28 14:38:25 -070043
44filegroup(
45 name = "release",
46 srcs = [
David L. Jonesd76f8c82022-04-22 16:58:16 -070047 "//java/core:release", # contains lite.
Deanna Garcia933239f2022-03-01 00:27:42 +000048 "//java/kotlin:release",
49 "//java/kotlin-lite:release",
Derek Perezc6844342021-06-28 14:38:25 -070050 "//java/util:release",
David L. Jonesd76f8c82022-04-22 16:58:16 -070051 ],
52)
53
54################################################################################
55# Packaging rules
56################################################################################
57
58pkg_files(
59 name = "dist_files",
60 srcs = [
David L. Jones95da0ba2022-04-29 17:57:55 -070061 "BUILD.bazel",
David L. Jonesd76f8c82022-04-22 16:58:16 -070062 "README.md",
63 "bom/pom.xml",
64 "lite.md",
65 "pom.xml",
Deanna Garcia75d12d42022-06-29 20:02:58 +000066 "protoc/pom.xml",
David L. Jonesd76f8c82022-04-22 16:58:16 -070067 ],
68 strip_prefix = strip_prefix.from_root(""),
69 visibility = ["//pkg:__pkg__"],
70)
71
72pkg_filegroup(
73 name = "all_dist_files",
74 srcs = [
75 ":dist_files",
76 "//java/core:dist_files",
77 "//java/internal:dist_files",
78 "//java/kotlin:dist_files",
79 "//java/kotlin-lite:dist_files",
80 "//java/lite:dist_files",
81 "//java/util:dist_files",
82 ],
83 visibility = ["//pkg:__pkg__"],
Deanna Garciadfd99e72022-01-12 21:54:30 +000084)