Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazel-installer-linux-x86_64.sh.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e0e4efe35b2c9f2b1f3c3929fc401e27c312090e6a305c046ecb59b9e3128e00 bazel-0.2.3-installer-linux-x86_64.sh
97dd53414e12da1c9a8a23911ebe732b4b278295ed6b226a5ddee4cd6775a01b bazel-0.3.1-installer-linux-x86_64.sh
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ jdk:
- oraclejdk8

before_install:
- wget 'https://github.com/bazelbuild/bazel/releases/download/0.2.3/bazel-0.2.3-installer-linux-x86_64.sh'
- wget 'https://github.com/bazelbuild/bazel/releases/download/0.3.1/bazel-0.3.1-installer-linux-x86_64.sh'
- sha256sum -c .bazel-installer-linux-x86_64.sh.sha256
- chmod +x bazel-0.2.3-installer-linux-x86_64.sh
- ./bazel-0.2.3-installer-linux-x86_64.sh --user
- chmod +x bazel-0.3.1-installer-linux-x86_64.sh
- ./bazel-0.3.1-installer-linux-x86_64.sh --user
- mv .bazelrc.travis .bazelrc
- cat ~/.bazelrc >> .bazelrc

script:
- bash test_run.sh
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ and `scala_test`.
## Getting started

In order to use `scala_library`, `scala_macro_library`, and `scala_binary`,
you must have bazel 0.2.3 and add the following to your WORKSPACE file:
you must have bazel 0.3.1 and add the following to your WORKSPACE file:

```python
git_repository(
name = "io_bazel_rules_scala",
remote = "https://github.com/bazelbuild/rules_scala.git",
commit = "7b891adb975b4e3e6569b763d39ab6e9234196c9", # update this as needed
)
git_repository(
name = "io_bazel",
remote = "git://github.com/bazelbuild/bazel.git",
tag = "0.3.1",
)

load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
scala_repositories()
```
Expand All @@ -40,6 +46,13 @@ load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library", "scala_binary",
```
You may wish to have these rules loaded by default using bazel's prelude. You can add the above to the file `tools/build_rules/prelude_bazel` in your repo (don't forget to have a, possibly empty, BUILD file there) and then it will be automatically prepended to every BUILD file in the workspace.

To run with a persistant worker (much faster), you need to add
```python
build --strategy=Scalac=worker
test --strategy=Scalac=worker
```
to your command line, or to enable by default for building/testing add it to your .bazelrc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to do this do you need to make lines like:

build --strategy=Scalac=worker
test --strategy=Scalac=worker

or can you just add --strategy=Scalac=worker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhhh, i could be totally wrong, so lets just put that in


[scala]: http://www.scala-lang.org/

<a name="scala_library"></a>
Expand Down
7 changes: 7 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ maven_jar(
name = "org_psywerx_hairyfotr__linter",
artifact = scala_mvn_artifact("org.psywerx.hairyfotr:linter:0.1.13"),
sha1 = "e5b3e2753d0817b622c32aedcb888bcf39e275b4")


git_repository(
name = "io_bazel",
remote = "git://github.com/bazelbuild/bazel.git",
commit = "0.3.1",
)
Loading