forked from bazelbuild/rules_scala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
support.bzl
111 lines (108 loc) · 2.99 KB
/
support.bzl
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
load("//scala:scala.bzl", "scala_library")
load("//scala/versions:versions.bzl", "sanitize_version")
load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_VERSION", "SCALA_VERSIONS")
load("@io_bazel_rules_scala//scala:scala_cross_version.bzl", "extract_major_version")
_SCALAC_OPTS = {
"3.3": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
],
"3.2": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
],
"3.1": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
],
"2.13": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Wunused:imports",
],
"2.12": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture",
"-Ywarn-unused-import",
"-Ypartial-unification",
],
"2.11": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture",
"-Ywarn-unused-import",
"-Ypartial-unification",
],
}
def test_reporters():
_test_reporter("test_reporter", SCALA_VERSION)
for scala_version in SCALA_VERSIONS:
_test_reporter("test_reporter_" + sanitize_version(scala_version), scala_version)
def _test_reporter(name, scala_version):
scala_library(
name = name,
srcs = ["JUnitXmlReporter.scala"],
scalacopts = _SCALAC_OPTS[extract_major_version(scala_version)],
visibility = ["//visibility:public"],
deps = [
"//scala/private/toolchain_deps:scala_xml",
"//testing/toolchain:scalatest_classpath",
],
)