@@ -598,9 +598,12 @@ def _scala_junit_test_impl(ctx):
598
598
_implicit_deps = {
599
599
"_ijar" : attr .label (executable = True , cfg = "host" , default = Label ("@bazel_tools//tools/jdk:ijar" ), allow_files = True ),
600
600
"_scalac" : attr .label (executable = True , cfg = "host" , default = Label ("//src/java/io/bazel/rulesscala/scalac" ), allow_files = True ),
601
- "_scalalib" : attr .label (default = Label ("@scala//:lib/scala-library.jar" ), single_file = True , allow_files = True ),
602
- "_scalacompiler" : attr .label (default = Label ("@scala//:lib/scala-compiler.jar" ), single_file = True , allow_files = True ),
603
- "_scalareflect" : attr .label (default = Label ("@scala//:lib/scala-reflect.jar" ), single_file = True , allow_files = True ),
601
+ #"_scalalib": attr.label(default=Label("@scala//:lib/scala-library.jar"), single_file=True, allow_files=True),
602
+ #"_scalacompiler": attr.label(default=Label("@scala//:lib/scala-compiler.jar"), single_file=True, allow_files=True),
603
+ #"_scalareflect": attr.label(default=Label("@scala//:lib/scala-reflect.jar"), single_file=True, allow_files=True),
604
+ "_scalalib" : attr .label (default = Label ("//external:io_bazel_rules_scala/dependency/scala210/scala_library" ), single_file = True , allow_files = True ),
605
+ "_scalacompiler" : attr .label (default = Label ("//external:io_bazel_rules_scala/dependency/scala210/scala_compiler" ), single_file = True , allow_files = True ),
606
+ "_scalareflect" : attr .label (default = Label ("//external:io_bazel_rules_scala/dependency/scala210/scala_reflect" ), single_file = True , allow_files = True ),
604
607
"_java" : attr .label (executable = True , cfg = "host" , default = Label ("@bazel_tools//tools/jdk:java" ), allow_files = True ),
605
608
"_javac" : attr .label (executable = True , cfg = "host" , default = Label ("@bazel_tools//tools/jdk:javac" ), allow_files = True ),
606
609
"_jar" : attr .label (executable = True , cfg = "host" , default = Label ("//src/java/io/bazel/rulesscala/jar:binary_deploy.jar" ), allow_files = True ),
@@ -747,6 +750,54 @@ filegroup(
747
750
)
748
751
"""
749
752
753
+ SCALA_BUILD_FILE_210 = """
754
+ # scala.BUILD
755
+ exports_files([
756
+ "bin/scala",
757
+ "bin/scalac",
758
+ "bin/scaladoc",
759
+ "lib/jline.jar",
760
+ "lib/scala-actors.jar",
761
+ "lib/scala-actors-migration.jar",
762
+ "lib/scala-compiler.jar",
763
+ "lib/scala-library.jar",
764
+ "lib/scala-reflect.jar",
765
+ "lib/scala-swing.jar",
766
+ ])
767
+
768
+ filegroup(
769
+ name = "scala-library",
770
+ srcs = ["lib/scala-library.jar"],
771
+ visibility = ["//visibility:public"],
772
+ )
773
+
774
+ filegroup(
775
+ name = "scala-reflect",
776
+ srcs = ["lib/scala-reflect.jar"],
777
+ visibility = ["//visibility:public"],
778
+ )
779
+
780
+ filegroup(
781
+ name = "scala-compiler",
782
+ srcs = ["lib/scala-compiler.jar"],
783
+ visibility = ["//visibility:public"],
784
+ )
785
+ """
786
+
787
+ def scala_210_repositories ():
788
+ native .new_http_archive (
789
+ name = "scala210" ,
790
+ strip_prefix = "scala-2.10.4" ,
791
+ url = "http://localhost:8000/scala-2.10.4.tgz" ,
792
+ build_file_content = SCALA_BUILD_FILE_210 ,
793
+ )
794
+
795
+ native .bind (name = 'io_bazel_rules_scala/dependency/scala210/scala_library' , actual = '@scala210//:scala-library' )
796
+
797
+ native .bind (name = 'io_bazel_rules_scala/dependency/scala210/scala_reflect' , actual = '@scala210//:scala-reflect' )
798
+
799
+ native .bind (name = 'io_bazel_rules_scala/dependency/scala210/scala_compiler' , actual = '@scala210//:scala-compiler' )
800
+
750
801
def scala_repositories ():
751
802
native .new_http_archive (
752
803
name = "scala" ,
@@ -797,7 +848,8 @@ def scala_export_to_java(name, exports, runtime_deps):
797
848
name = name ,
798
849
# these are the outputs of the scala_library targets
799
850
jars = jars ,
800
- runtime_deps = ["@scala//:lib/scala-library.jar" ] + runtime_deps
851
+ #runtime_deps = ["@scala//:lib/scala-library.jar"] + runtime_deps
852
+ runtime_deps = ["//external:io_bazel_rules_scala/dependency/scala210/scala_library" ] + runtime_deps
801
853
)
802
854
803
855
def _sanitize_string_for_usage (s ):
0 commit comments