Skip to content

Commit

Permalink
Merge branch 'master' into fix-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-skrodzka committed Nov 4, 2024
2 parents ff250bf + afadd88 commit 0433fef
Show file tree
Hide file tree
Showing 36 changed files with 177 additions and 5,283 deletions.
1 change: 0 additions & 1 deletion 3rdparty/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def jar_artifact_callback(hash):
)
native.bind(name = hash["bind"], actual = hash["actual"])


def list_dependencies():
return [
{"artifact":"com.github.scopt:scopt_3:4.1.0","url":"https://repo1.maven.org/maven2/com/github/scopt/scopt_3/4.1.0/scopt_3-4.1.0.jar","name":"com_github_scopt_scopt_3","actual":"@com_github_scopt_scopt_3//jar","bind": "jar/com/github/scopt/scopt_3"},
Expand Down
15 changes: 14 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
load("@rules_scala3//deps:scala_deps.bzl", "scala_deps")
load("@rules_scala3//rules:scala.bzl", "configure_zinc_scala")

filegroup(
name = "dependencies",
srcs = ["Dependencies.scala"],
visibility = ["//visibility:public"],
)

scala_deps(
name = "scala_deps",
src = "//:dependencies",
dependencies = "rules_scala3.Dependencies",
)

runtime_classpath_3 = [
"@scala3_library//jar",
"@scala_library_2_13//jar",
Expand All @@ -17,6 +30,6 @@ configure_zinc_scala(
compiler_bridge = "@scala3_sbt_bridge//jar",
compiler_classpath = compiler_classpath_3,
runtime_classpath = runtime_classpath_3,
version = "3.5.1-RC1",
version = "3.6.1",
visibility = ["//visibility:public"],
)
31 changes: 31 additions & 0 deletions Dependencies.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package rules_scala3

import sbt.librarymanagement.syntax.*
import sbt.librarymanagement.{DependencyBuilders, ModuleID, Resolver}, DependencyBuilders.OrganizationArtifactName

object Dependencies:

private val jmhV = "1.37"

val resolvers: Seq[Resolver] = Vector(
"mavencentral".at("https://repo1.maven.org/maven2/"),
"sonatype releases".at("https://oss.sonatype.org/service/local/repositories/releases/content"),
"apache staging".at("https://repository.apache.org/content/repositories/staging"),
"apache snapshots".at("https://repository.apache.org/snapshots"),
"google".at("https://maven.google.com/"),
"jitsi-maven-repository".at("https://github.com/jitsi/jitsi-maven-repository/raw/master/releases")
)
// 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[OrganizationArtifactName, String] = Map(
"org.scala-lang" % "scala3-library" -> "@scala3_library//jar",
"org.scala-lang" % "scala-library" -> "@scala_library_2_13//jar",
"org.scala-lang" % "scala-reflect" -> "@scala_reflect_2_13//jar"
)
val dependencies: Seq[ModuleID] = Vector(
"org.openjdk.jmh" % "jmh-core" % jmhV,
"org.openjdk.jmh" % "jmh-generator-bytecode" % jmhV,
"org.openjdk.jmh" % "jmh-generator-reflection" % jmhV,
"org.openjdk.jmh" % "jmh-generator-asm" % jmhV,
"com.github.scopt" %% "scopt" % "4.1.0"
)
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,11 @@ http_archive(

load("@rules_scala3//rules/scala:workspace.bzl", "scala_register_toolchains", "scala_repositories")
scala_repositories()
load("@annex//:defs.bzl", annex_pinned_maven_install = "pinned_maven_install")
annex_pinned_maven_install()
scala_register_toolchains()

load("@rules_scala3//rules/scalafmt:workspace.bzl", "scalafmt_default_config", "scalafmt_repositories")
scalafmt_repositories()
load("@annex_scalafmt//:defs.bzl", annex_scalafmt_pinned_maven_install = "pinned_maven_install")
annex_scalafmt_pinned_maven_install()
load("@rules_scala3//rules/scalafmt:config.bzl", "scalafmt_default_config")
scalafmt_default_config()

load("@rules_scala3//rules/scala_proto:workspace.bzl", "scala_proto_register_toolchains", "scala_proto_repositories",)
scala_proto_repositories()
load("@annex_proto//:defs.bzl", annex_proto_pinned_maven_install = "pinned_maven_install")
annex_proto_pinned_maven_install()
scala_proto_register_toolchains()

# Load bazel skylib and google protobuf
bazel_skylib_tag = "1.0.2"
bazel_skylib_sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44"
Expand Down
70 changes: 0 additions & 70 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,6 @@ http_archive(

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
name = "annex_deps",
artifacts = [
"com.github.scopt:scopt_3:4.1.0",
"org.scala-sbt:librarymanagement-core_3:2.0.0-M2",
"org.scala-sbt:librarymanagement-coursier_3:2.0.0-alpha8",
],
fetch_sources = True,
maven_install_json = "@rules_scala3//:annex_deps_install.json",
repositories = [
"https://repo1.maven.org/maven2",
"https://repo.maven.apache.org/maven2",
"https://maven-central.storage-download.googleapis.com/maven2",
"https://mirror.bazel.build/repo1.maven.org/maven2",
"https://scala-ci.typesafe.com/artifactory/scala-integration/",
],
)

load("@annex_deps//:defs.bzl", "pinned_maven_install")

pinned_maven_install()

rules_cc_version = "0.0.9"

http_archive(
Expand Down Expand Up @@ -80,28 +58,8 @@ load("//rules/scala:init.bzl", "rules_scala3_init")

rules_scala3_init()

load("@annex//:defs.bzl", annex_pinned_maven_install = "pinned_maven_install")

annex_pinned_maven_install()

scala_register_toolchains(default_compiler = "bootstrap")

load("//3rdparty:workspace.bzl", "maven_dependencies")

maven_dependencies()

load("//scala/3rdparty:workspace.bzl", "maven_dependencies")

maven_dependencies()

load("//rules/scalafmt/3rdparty:workspace.bzl", "maven_dependencies")

maven_dependencies()

load("//rules/scala_proto/3rdparty:workspace.bzl", "maven_dependencies")

maven_dependencies()

load("//mezel_compatibility:repositories.bzl", "mezel_compatibility_repository")

mezel_compatibility_repository(
Expand All @@ -113,31 +71,3 @@ mezel_compatibility_repository(
load("@mezel//rules:load_mezel.bzl", "load_mezel")

load_mezel()

load("//rules/scalafmt:workspace.bzl", "scalafmt_default_config", "scalafmt_repositories")

scalafmt_repositories()

load("@annex_scalafmt//:defs.bzl", annex_scalafmt_pinned_maven_install = "pinned_maven_install")

annex_scalafmt_pinned_maven_install()

scalafmt_default_config(".scalafmt.conf")

load(
"//rules/scala_proto:workspace.bzl",
"scala_proto_register_toolchains",
"scala_proto_repositories",
)

scala_proto_repositories()

scala_proto_register_toolchains()

load("@annex_proto//:defs.bzl", annex_proto_pinned_maven_install = "pinned_maven_install")

annex_proto_pinned_maven_install()

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()
Loading

0 comments on commit 0433fef

Please sign in to comment.