@@ -52,27 +52,70 @@ http_jar(
5252 url = "https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.16/scala-compiler-2.12.16-sources.jar" ,
5353)
5454
55+ http_jar (
56+ name = "scala3_compiler_srcjar" ,
57+ sha256 = "3c413efa9a2921ef59da7f065c445ae1b6b97057cbbc6b16957ad052a575a3ce" ,
58+ url = "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.4.3/scala3-compiler_3-3.4.3-sources.jar" ,
59+ )
60+
5561scala_maven_import_external (
5662 name = "scala_library" ,
57- artifact = "org.scala-lang:scala-library:%s" % SCALA_VERSION ,
63+ artifact = "org.scala-lang:scala-library:%s" % SCALA_VERSION if SCALA_VERSION . startswith ( "2." ) else "org.scala-lang:scala3-library_3:%s" % SCALA_VERSION ,
5864 licenses = ["notice" ],
5965 server_urls = default_maven_server_urls (),
6066)
6167
6268scala_maven_import_external (
6369 name = "scala_compiler" ,
64- artifact = "org.scala-lang:scala-compiler:%s" % SCALA_VERSION ,
70+ artifact = "org.scala-lang:scala-compiler:%s" % SCALA_VERSION if SCALA_VERSION . startswith ( "2." ) else "org.scala-lang:scala3-compiler_3:%s" % SCALA_VERSION ,
6571 licenses = ["notice" ],
6672 server_urls = default_maven_server_urls (),
6773)
6874
75+ # Scala 2 only
6976scala_maven_import_external (
7077 name = "scala_reflect" ,
7178 artifact = "org.scala-lang:scala-reflect:%s" % SCALA_VERSION ,
7279 licenses = ["notice" ],
7380 server_urls = default_maven_server_urls (),
7481)
7582
83+ # Scala 3 only
84+ scala_maven_import_external (
85+ name = "scala3_interfaces" ,
86+ artifact = "org.scala-lang:scala3-interfaces:%s" % SCALA_VERSION ,
87+ licenses = ["notice" ],
88+ server_urls = default_maven_server_urls (),
89+ )
90+
91+ scala_maven_import_external (
92+ name = "scala2_library" ,
93+ artifact = "org.scala-lang:scala-library:2.13.15" ,
94+ licenses = ["notice" ],
95+ server_urls = default_maven_server_urls (),
96+ )
97+
98+ scala_maven_import_external (
99+ name = "tasty_core" ,
100+ artifact = "org.scala-lang:tasty-core_3:%s" % SCALA_VERSION ,
101+ licenses = ["notice" ],
102+ server_urls = default_maven_server_urls (),
103+ )
104+
105+ scala_maven_import_external (
106+ name = "scala_asm" ,
107+ artifact = "org.scala-lang.modules:scala-asm:9.7.0-scala-2" ,
108+ licenses = ["notice" ],
109+ server_urls = default_maven_server_urls (),
110+ )
111+
112+ scala_maven_import_external (
113+ name = "sbt_compiler_interface" ,
114+ artifact = "org.scala-sbt:compiler-interface:1.9.6" ,
115+ licenses = ["notice" ],
116+ server_urls = default_maven_server_urls (),
117+ )
118+
76119srcjars_by_version = {
77120 # Invalid
78121 "2.12.11" : [],
@@ -120,6 +163,23 @@ srcjars_by_version = {
120163 "2.13.15" : {
121164 "url" : "https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.13.15/scala-compiler-2.13.15-sources.jar?foo" ,
122165 },
166+ "3.1.3" : {
167+ "url" : "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.1.3/scala3-compiler_3-3.1.3-sources.jar" ,
168+ "integrity" : "sha384-4J2ihR1QSdP5cvL3y2OUfw4uUX/hsQqcPlJV+IrQdsM/soiIAYfoEeIEt6vl3xBk" ,
169+ },
170+ "3.2.2" : {
171+ "url" : "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.2.2/scala3-compiler_3-3.2.2-sources.jar" ,
172+ "sha256" : "669d580fc4a8d3c2e2d13d5735ae9be05d567613fe44482de5bcc5e2e2ee89ea" ,
173+ },
174+ "3.3.4" : {
175+ "url" : "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.3.4/scala3-compiler_3-3.3.4-sources.jar" ,
176+ },
177+ "3.4.3" : {
178+ "label" : "@scala3_compiler_srcjar//jar:downloaded.jar" ,
179+ },
180+ "3.5.2" : {
181+ "url" : "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.5.2/scala3-compiler_3-3.5.2-sources.jar" ,
182+ },
123183}
124184
125185rules_scala_setup (scala_compiler_srcjar = srcjars_by_version [SCALA_VERSION ])
0 commit comments