-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca1897d
commit b2c6c69
Showing
4 changed files
with
26 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
package rules_scala3.deps | ||
|
||
import java.io.File | ||
|
||
import sbt.librarymanagement.DependencyBuilders.OrganizationArtifactName | ||
import sbt.librarymanagement.syntax.* | ||
|
||
@main def Deps(args: String*): Unit = | ||
// parse args | ||
vars = Vars( | ||
projectRoot = new File("/home/name_snrl/work/forks/rules_scala3"), | ||
projectRoot = new File("/tmp/rules_scala3"), | ||
depsDirName = "3rdparty", | ||
bazelExtFileName = "workspace.bzl", | ||
buildFilesDirName = "jvm", | ||
buildFileName = "BUILD", | ||
scalaVersion = "3.3.0", | ||
buildFileHeader = """load("@io_bazel_rules_scala//scala:scala_import.bzl", "scala_import")""" | ||
buildFileHeader = """load("@rules_scala3//rules:scala.bzl", "scala_import")""" | ||
) | ||
|
||
// Replacements are not handled by `librarymanagement`. any Scala prefix in the name will be dropped. | ||
// It also doesn't matter whether you use double `%` to get the Scala version or not. | ||
val replacements = Map( | ||
"org.scala-lang" % "scala-compiler" -> "@io_bazel_rules_scala_scala_compiler//:io_bazel_rules_scala_scala_compiler", | ||
"org.scala-lang" % "scala-library" -> "@io_bazel_rules_scala_scala_library//:io_bazel_rules_scala_scala_library", | ||
"org.scala-lang" % "scala-reflect" -> "@io_bazel_rules_scala_scala_reflect//:io_bazel_rules_scala_scala_reflect", | ||
"org.scala-lang.modules" % "scala-parser-combinators" -> "@io_bazel_rules_scala_scala_parser_combinators//:io_bazel_rules_scala_scala_parser_combinators", | ||
"org.scala-lang.modules" % "scala-xml" -> "@io_bazel_rules_scala_scala_xml//:io_bazel_rules_scala_scala_xml", | ||
val replacements = Map[OrganizationArtifactName, String]( | ||
"org.scala-lang" % "scala3-library" -> "@scala_library_3_3_1//jar", | ||
"org.scala-lang" % "scala-library" -> "@scala_library_2_13_11//jar", | ||
"org.scala-lang" % "scala-reflect" -> "@scala_reflect_2_13_11//jar", | ||
) | ||
|
||
val dependencies = Vector( | ||
"org.scala-sbt" % "librarymanagement-core_3" % "2.0.0-alpha12", | ||
"org.scala-sbt" % "librarymanagement-coursier_3" % "2.0.0-alpha6", | ||
"org.scala-sbt" % "librarymanagement-core_3" % "2.0.0-alpha12", | ||
"org.scala-sbt" % "librarymanagement-coursier_3" % "2.0.0-alpha6" | ||
) | ||
|
||
MakeTree(dependencies, replacements) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters