diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | WORKSPACE | 61 | ||||
-rw-r--r-- | core/BUILD | 8 | ||||
-rw-r--r-- | toolchains/BUILD | 14 | ||||
-rw-r--r-- | tools/build_rules/BUILD | 0 | ||||
-rw-r--r-- | tools/build_rules/prelude_bazel | 1 |
6 files changed, 85 insertions, 0 deletions
@@ -1,4 +1,5 @@ .idea target *~ +bazel-* diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 0000000..80243e3 --- /dev/null +++ b/WORKSPACE @@ -0,0 +1,61 @@ +scala_rules_version="41ac5be57e50ee5433fa40e6a1de86914d92dbfb" +maven_rules_version="9c3b07a6d9b195a1192aea3cd78afd1f66c80710" + +http_archive( + name = "io_bazel_rules_scala", + url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip" % scala_rules_version, + type = "zip", + strip_prefix= "rules_scala-%s" % scala_rules_version, +) + +http_archive( + name = "org_pubref_rules_maven", + url = "https://github.com/pubref/rules_maven/archive/%s.zip" % maven_rules_version, + type = "zip", + strip_prefix= "rules_maven-%s" % maven_rules_version, +) + +load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories", "scala_mvn_artifact") +scala_repositories() + +load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains") +register_toolchains("//toolchains:scala_toolchain") + +load("@org_pubref_rules_maven//maven:rules.bzl", "maven_repositories", "maven_repository") +maven_repositories() + +maven_repository( + name = "deps", + repositories = { + }, + omit = [ + "org.scala-lang:scala-library", + ], + force = [ + "org.scala-lang:scala-library:2.12.4", + "org.scala-lang:scala-reflect:2.12.4", + "org.scala-lang:scala-compiler:2.12.4", + ], + deps = [ + "org.scala-lang.plugins:scala-continuations-library_2.12:1.0.3", + "org.scala-lang.plugins:scala-continuations-plugin_2.12.2:1.0.3", + + "io.monix:monix-reactive_2.12:2.3.3", + ], + transitive_deps = [ + '2b5a0a9c06db69365a916317d77d068f2b9185d0:io.monix:monix-eval_2.12:2.3.3', + '700016fcc15ffef9a83dfd082fc88e25d936275a:io.monix:monix-execution_2.12:2.3.3', + '82e593b89260a562f9ac334a290a37f5527a474c:io.monix:monix-reactive_2.12:2.3.3', + '007df159e73f74ca04f0330d350d85fadb3e1d9d:io.monix:monix-types_2.12:2.3.3', + '1d055e97b997dae4d8ea28ae5ebc328334f82ac6:org.jctools:jctools-core:2.0.1', + '14b8c877d98005ba3941c9257cfe09f6ed0e0d74:org.reactivestreams:reactive-streams:1.0.0', + 'e22de3366a698a9f744106fb6dda4335838cf6a7:org.scala-lang.modules:scala-xml_2.12:1.0.6', + 'fc5af375ef8c9da08fd5dc6c8055aeec09be60ae:org.scala-lang.plugins:scala-continuations-library_2.12:1.0.3', + '88dd2cf0cb6f74ed02c19872b92d64e09050cff2:org.scala-lang.plugins:scala-continuations-plugin_2.12.2:1.0.3', + 'c69c0ee397050d7fa30cfe490471388d30c03bd0:org.scala-lang:scala-compiler:2.12.4', + 'omit:org.scala-lang:scala-library:2.12.4', + '2df9e6015b97e35464edddd20eec392bb54fab11:org.scala-lang:scala-reflect:2.12.4', + ], +) +load("@deps//:rules.bzl", "deps_compile") +deps_compile() diff --git a/core/BUILD b/core/BUILD new file mode 100644 index 0000000..a704af2 --- /dev/null +++ b/core/BUILD @@ -0,0 +1,8 @@ +scala_library( + name = "fibers_core", + srcs = glob(["lib/**/*.scala"]), + deps = ["@deps//:compile"], + plugins = ["@org_scala_lang_plugins_scala_continuations_plugin_2_12_2//jar"], + scalacopts = ["-Ywarn-unused", "-P:continuations:enable"], + visibility = ["//visibility:public"], +) diff --git a/toolchains/BUILD b/toolchains/BUILD new file mode 100644 index 0000000..3bf326f --- /dev/null +++ b/toolchains/BUILD @@ -0,0 +1,14 @@ +load("@io_bazel_rules_scala//scala:scala_toolchain.bzl", "scala_toolchain") + +scala_toolchain( + name = "toolchain_impl", + scalacopts = ["-Ywarn-unused"], + visibility = ["//visibility:public"] +) + +toolchain( + name = "scala_toolchain", + toolchain_type = "@io_bazel_rules_scala//scala:toolchain_type", + toolchain = "toolchain_impl", + visibility = ["//visibility:public"] +) diff --git a/tools/build_rules/BUILD b/tools/build_rules/BUILD new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/build_rules/BUILD diff --git a/tools/build_rules/prelude_bazel b/tools/build_rules/prelude_bazel new file mode 100644 index 0000000..de7de67 --- /dev/null +++ b/tools/build_rules/prelude_bazel @@ -0,0 +1 @@ +load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library", "scala_binary", "scala_test") |