|
1 | 1 | load("//scala:scala.bzl", "scala_library") |
2 | | -load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_MAJOR_VERSION") |
| 2 | +load("//scala:scala_cross_version_select.bzl", "select_for_scala_version") |
3 | 3 |
|
4 | 4 | scala_library( |
5 | 5 | name = "test_reporter", |
6 | 6 | srcs = ["JUnitXmlReporter.scala"], |
7 | | - scalacopts = { |
8 | | - "3.3": [ |
9 | | - "-deprecation:true", |
10 | | - "-encoding", |
11 | | - "UTF-8", |
12 | | - "-feature", |
13 | | - "-language:existentials", |
14 | | - "-language:higherKinds", |
15 | | - "-language:implicitConversions", |
16 | | - "-unchecked", |
17 | | - "-Xfatal-warnings", |
18 | | - ], |
19 | | - "3.2": [ |
20 | | - "-deprecation:true", |
21 | | - "-encoding", |
22 | | - "UTF-8", |
23 | | - "-feature", |
24 | | - "-language:existentials", |
25 | | - "-language:higherKinds", |
26 | | - "-language:implicitConversions", |
27 | | - "-unchecked", |
28 | | - "-Xfatal-warnings", |
29 | | - ], |
30 | | - "3.1": [ |
31 | | - "-deprecation:true", |
32 | | - "-encoding", |
33 | | - "UTF-8", |
34 | | - "-feature", |
35 | | - "-language:existentials", |
36 | | - "-language:higherKinds", |
37 | | - "-language:implicitConversions", |
38 | | - "-unchecked", |
39 | | - "-Xfatal-warnings", |
40 | | - ], |
41 | | - "2.13": [ |
42 | | - "-deprecation:true", |
43 | | - "-encoding", |
44 | | - "UTF-8", |
45 | | - "-feature", |
46 | | - "-language:existentials", |
47 | | - "-language:higherKinds", |
48 | | - "-language:implicitConversions", |
49 | | - "-unchecked", |
50 | | - "-Xfatal-warnings", |
| 7 | + scalacopts = [ |
| 8 | + "-deprecation:true", |
| 9 | + "-encoding", |
| 10 | + "UTF-8", |
| 11 | + "-feature", |
| 12 | + "-language:existentials", |
| 13 | + "-language:higherKinds", |
| 14 | + "-language:implicitConversions", |
| 15 | + "-unchecked", |
| 16 | + "-Xfatal-warnings", |
| 17 | + ] + select_for_scala_version( |
| 18 | + any_2 = [ |
51 | 19 | "-Xlint", |
52 | 20 | "-Ywarn-dead-code", |
53 | 21 | "-Ywarn-numeric-widen", |
54 | 22 | "-Ywarn-value-discard", |
55 | | - "-Wunused:imports", |
56 | 23 | ], |
57 | | - "2.12": [ |
58 | | - "-deprecation:true", |
59 | | - "-encoding", |
60 | | - "UTF-8", |
61 | | - "-feature", |
62 | | - "-language:existentials", |
63 | | - "-language:higherKinds", |
64 | | - "-language:implicitConversions", |
65 | | - "-unchecked", |
66 | | - "-Xfatal-warnings", |
67 | | - "-Xlint", |
68 | | - "-Yno-adapted-args", |
69 | | - "-Ywarn-dead-code", |
70 | | - "-Ywarn-numeric-widen", |
71 | | - "-Ywarn-value-discard", |
72 | | - "-Xfuture", |
73 | | - "-Ywarn-unused-import", |
74 | | - "-Ypartial-unification", |
| 24 | + any_2_13 = [ |
| 25 | + "-Wunused:imports", |
75 | 26 | ], |
76 | | - "2.11": [ |
77 | | - "-deprecation:true", |
78 | | - "-encoding", |
79 | | - "UTF-8", |
80 | | - "-feature", |
81 | | - "-language:existentials", |
82 | | - "-language:higherKinds", |
83 | | - "-language:implicitConversions", |
84 | | - "-unchecked", |
85 | | - "-Xfatal-warnings", |
86 | | - "-Xlint", |
| 27 | + before_2_13 = [ |
87 | 28 | "-Yno-adapted-args", |
88 | | - "-Ywarn-dead-code", |
89 | | - "-Ywarn-numeric-widen", |
90 | | - "-Ywarn-value-discard", |
91 | 29 | "-Xfuture", |
92 | 30 | "-Ywarn-unused-import", |
93 | 31 | "-Ypartial-unification", |
94 | 32 | ], |
95 | | - }[SCALA_MAJOR_VERSION], |
| 33 | + ), |
96 | 34 | visibility = ["//visibility:public"], |
97 | 35 | deps = [ |
98 | 36 | "//scala/private/toolchain_deps:scala_xml", |
|
0 commit comments