-
Notifications
You must be signed in to change notification settings - Fork 13
/
MODULE.bazel
151 lines (127 loc) · 5.82 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
module(name = "rules_play_routes")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)
bazel_dep(name = "rules_java", version = "7.11.1")
bazel_dep(name = "rules_jvm_external", version = "6.4")
bazel_dep(name = "rules_pkg", version = "1.0.1", dev_dependency = True)
bazel_dep(name = "rules_scala_annex")
rules_scala_annex_version = "lucid_2024-12-06"
archive_override(
module_name = "rules_scala_annex",
integrity = "sha256-lSbyWlYtgP0ENngg4gKU1EBJ8d1sgMQKJlmOHwmCw3k=",
strip_prefix = "rules_scala-{}".format(rules_scala_annex_version),
urls = ["https://github.com/lucidsoftware/rules_scala/archive/refs/tags/{}.zip".format(rules_scala_annex_version)],
)
bazel_dep(name = "stardoc", version = "0.7.1", dev_dependency = True)
register_toolchains(
"//:repository_default_toolchain_21_definition",
"//play-routes-toolchain:play-routes-3",
"//play-routes-toolchain:play-routes-2-13",
"//scala:zinc_2_13",
"//scala:zinc_3",
)
# Please ensure these stay up-to-date with the versions in `versions.bzl`. Unfortunately,
# `MODULE.bazel` files can't call `load`, so we have to copy them here.
play_version = "3.0.4"
# Please ensure these stay up-to-date with the versions in `scala/version.bzl`. Unfortunately,
# `MODULE.bazel` files can't call `load`, so we have to copy them here.
scala_2_13_version = "2.13.14"
scala_3_version = "3.5.1"
protobuf_version = "4.28.3"
scopt_version = "4.1.0"
specs2_version = "4.20.8"
zinc_version = "1.10.4"
play_routes_compiler_cli_2_13 = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
play_routes_compiler_cli_2_13.install(
name = "play_routes_compiler_cli_2_13",
artifacts = [
"com.github.scopt:scopt_2.13:{}".format(scopt_version),
"com.google.protobuf:protobuf-java:{}".format(protobuf_version),
"org.playframework:play-routes-compiler_2.13:{}".format(play_version),
"org.scala-lang:scala-compiler:{}".format(scala_2_13_version),
"org.scala-lang:scala-library:{}".format(scala_2_13_version),
"org.scala-lang:scala-reflect:{}".format(scala_2_13_version),
"org.scala-sbt:compiler-interface:{}".format(zinc_version),
"org.scala-sbt:util-interface:{}".format(zinc_version),
"org.scala-sbt:zinc_2.13:{}".format(zinc_version),
],
fail_if_repin_required = True,
fetch_sources = True,
lock_file = "//:play_routes_compiler_cli_2_13_install.json",
repositories = ["https://repo.maven.apache.org/maven2"],
)
# Set neverlink = True to avoid Scala 2 library being pulled on to the wrong compiler classpath
play_routes_compiler_cli_2_13.artifact(
name = "play_routes_compiler_cli_2_13",
artifact = "compiler-bridge_2.13",
group = "org.scala-sbt",
neverlink = True,
version = zinc_version,
)
use_repo(play_routes_compiler_cli_2_13, "play_routes_compiler_cli_2_13")
play_routes_compiler_cli_3 = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
play_routes_compiler_cli_3.install(
name = "play_routes_compiler_cli_3",
artifacts = [
"com.github.scopt:scopt_3:{}".format(scopt_version),
"com.google.protobuf:protobuf-java:{}".format(protobuf_version),
"org.playframework:play-routes-compiler_3:{}".format(play_version),
"org.scala-lang:scala3-compiler_3:{}".format(scala_3_version),
"org.scala-lang:scala3-library_3:{}".format(scala_3_version),
"org.scala-sbt:compiler-interface:{}".format(zinc_version),
"org.scala-sbt:zinc_2.13:{}".format(zinc_version),
"org.scala-sbt:util-interface:{}".format(zinc_version),
],
fail_if_repin_required = True,
fetch_sources = True,
lock_file = "@rules_play_routes//:play_routes_compiler_cli_3_install.json",
repositories = ["https://repo.maven.apache.org/maven2"],
)
# Set neverlink = True to avoid Scala 2 library being pulled on to the compiler classpath
play_routes_compiler_cli_3.artifact(
name = "play_routes_compiler_cli_3",
artifact = "scala3-sbt-bridge",
group = "org.scala-lang",
neverlink = True,
version = scala_3_version,
)
use_repo(play_routes_compiler_cli_3, "play_routes_compiler_cli_3")
play_routes_test_2_13_artifacts, play_routes_test_3_artifacts = [
[
"org.playframework:play_{}:{}".format(scala_version, play_version),
"org.playframework:play-specs2_{}:{}".format(scala_version, play_version),
"org.playframework:play-test_{}:{}".format(scala_version, play_version),
"org.specs2:specs2-common_{}:{}".format(scala_version, specs2_version),
"org.specs2:specs2-core_{}:{}".format(scala_version, specs2_version),
"org.specs2:specs2-matcher_{}:{}".format(scala_version, specs2_version),
]
for scala_version in [
"2.13",
"3",
]
]
play_routes_test_repositories = [
"https://maven-central.storage-download.googleapis.com/maven2",
"https://mirror.bazel.build/repo1.maven.org/maven2",
"https://repo.maven.apache.org/maven2",
]
play_routes_test_2_13 = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
play_routes_test_2_13.install(
name = "play_routes_test_2_13",
artifacts = play_routes_test_2_13_artifacts,
fail_if_repin_required = True,
fetch_sources = True,
lock_file = "@rules_play_routes//:play_routes_test_2_13_install.json",
repositories = play_routes_test_repositories,
)
use_repo(play_routes_test_2_13, "play_routes_test_2_13")
play_routes_test_3 = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
play_routes_test_3.install(
name = "play_routes_test_3",
artifacts = play_routes_test_3_artifacts,
fail_if_repin_required = True,
fetch_sources = True,
lock_file = "@rules_play_routes//:play_routes_test_3_install.json",
repositories = play_routes_test_repositories,
)
use_repo(play_routes_test_3, "play_routes_test_3")