-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Initial Bazel integration #9777
base: develop
Are you sure you want to change the base?
Changes from 1 commit
bdce72d
6836fa8
d9387ac
f0fe74e
314af22
873b904
e8a67cc
b3f9472
51d55d2
ab61bd0
cd8f504
fede7ef
94e3a35
0ae2b60
5bb8e4b
38604ca
2d52296
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
## https://github.com/bazelbuild/rules_scala/pull/1541 | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") | ||
|
||
|
||
http_archive( | ||
name = "bazel_skylib", | ||
|
@@ -55,3 +57,42 @@ scalatest_toolchain() | |
## https://github.com/bazelbuild/rules_scala/issues/1521 | ||
## Workaround is to use our own scala toolchain with custom options. | ||
register_toolchains("//toolchains:enso_toolchain") | ||
|
||
|
||
## Setup `bazel-distribution` for generating pom.xml | ||
RULES_BAZEL_DISTRIBUTION_SHA = "3f88eb2ff11654039fa64cbc67a8411df1b85fba" | ||
|
||
git_repository( | ||
name = "vaticle_bazel_distribution", | ||
commit = RULES_BAZEL_DISTRIBUTION_SHA, | ||
remote = "https://github.com/vaticle/bazel-distribution", | ||
) | ||
|
||
### Dependencies of `bazel-distribution` | ||
http_archive( | ||
name = "rules_pkg", | ||
urls = [ | ||
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", | ||
"https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", | ||
], | ||
sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", | ||
) | ||
## Uses more up-to-date version of rules_kotlin than what | ||
## @vaticle_bazel_distribution seems to rely on | ||
## as encountered various issues, including a blocker of | ||
## https://github.com/bazelbuild/rules_kotlin/issues/1072. | ||
rules_kotlin_version = "1.9.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need kotlin rules? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dependency of |
||
rules_kotlin_sha = "5766f1e599acf551aa56f49dab9ab9108269b03c557496c54acaf41f98e2b8d6" | ||
http_archive( | ||
name = "io_bazel_rules_kotlin", | ||
urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v%s/rules_kotlin-v%s.tar.gz" % (rules_kotlin_version, rules_kotlin_version)], | ||
sha256 = rules_kotlin_sha, | ||
) | ||
|
||
### Default setup for `baze-distribution` | ||
load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories") | ||
kotlin_repositories() # if you want the default. Otherwise see custom kotlinc distribution below | ||
load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains") | ||
kt_register_toolchains() | ||
load("@vaticle_bazel_distribution//common:rules.bzl", "workspace_refs") | ||
workspace_refs(name = "enso_org_enso_workspace_refs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need picocli? What does
bazel-distribution dependencies
mean?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the comment says, it is a dependency of
bazel-distribution
rules which are used for generatingpom.xml
.This doesn't mean that this dependency is added to any of subprojects. But it has to be listed for the rules so that the dependency (and its version) is discoverable.