|
1 | 1 | workspace(name = "io_bazel_rules_scala")
|
2 | 2 |
|
3 |
| - |
4 |
| - |
5 | 3 | load("//scala:scala.bzl", "scala_repositories")
|
| 4 | + |
6 | 5 | scala_repositories()
|
7 | 6 |
|
8 | 7 | load("//twitter_scrooge:twitter_scrooge.bzl", "twitter_scrooge", "scrooge_scala_library")
|
| 8 | + |
9 | 9 | twitter_scrooge()
|
10 | 10 |
|
11 | 11 | load("//tut_rule:tut.bzl", "tut_repositories")
|
| 12 | + |
12 | 13 | tut_repositories()
|
13 | 14 |
|
14 | 15 | load("//jmh:jmh.bzl", "jmh_repositories")
|
| 16 | + |
15 | 17 | jmh_repositories()
|
16 | 18 |
|
17 | 19 | load("//scala_proto:scala_proto.bzl", "scala_proto_repositories")
|
| 20 | + |
18 | 21 | scala_proto_repositories()
|
19 | 22 |
|
20 |
| -load("//specs2:specs2_junit.bzl","specs2_junit_repositories") |
| 23 | +load("//specs2:specs2_junit.bzl", "specs2_junit_repositories") |
| 24 | + |
21 | 25 | specs2_junit_repositories()
|
22 | 26 |
|
23 | 27 | load("//scala:scala_cross_version.bzl", "scala_mvn_artifact")
|
24 | 28 |
|
25 | 29 | # test adding a scala jar:
|
26 | 30 | maven_jar(
|
27 |
| - name = "com_twitter__scalding_date", |
28 |
| - artifact = scala_mvn_artifact("com.twitter:scalding-date:0.17.0"), |
29 |
| - sha1 = "420fb0c4f737a24b851c4316ee0362095710caa5" |
| 31 | + name = "com_twitter__scalding_date", |
| 32 | + artifact = scala_mvn_artifact("com.twitter:scalding-date:0.17.0"), |
| 33 | + sha1 = "420fb0c4f737a24b851c4316ee0362095710caa5", |
30 | 34 | )
|
31 | 35 |
|
32 | 36 | # For testing that we don't include sources jars to the classpath
|
33 | 37 | maven_jar(
|
34 |
| - name = "org_typelevel__cats_core", |
35 |
| - artifact = scala_mvn_artifact("org.typelevel:cats-core:0.9.0"), |
36 |
| - sha1 = "b2f8629c6ec834d8b6321288c9fe77823f1e1314" |
| 38 | + name = "org_typelevel__cats_core", |
| 39 | + artifact = scala_mvn_artifact("org.typelevel:cats-core:0.9.0"), |
| 40 | + sha1 = "b2f8629c6ec834d8b6321288c9fe77823f1e1314", |
37 | 41 | )
|
38 | 42 |
|
39 |
| - |
40 | 43 | # test of a plugin
|
41 | 44 | maven_jar(
|
42 |
| - name = "org_psywerx_hairyfotr__linter", |
43 |
| - artifact = scala_mvn_artifact("org.psywerx.hairyfotr:linter:0.1.13"), |
44 |
| - sha1 = "e5b3e2753d0817b622c32aedcb888bcf39e275b4") |
| 45 | + name = "org_psywerx_hairyfotr__linter", |
| 46 | + artifact = scala_mvn_artifact("org.psywerx.hairyfotr:linter:0.1.13"), |
| 47 | + sha1 = "e5b3e2753d0817b622c32aedcb888bcf39e275b4", |
| 48 | +) |
45 | 49 |
|
46 | 50 | # test of strict deps (scalac plugin UT + E2E)
|
47 | 51 | maven_jar(
|
48 | 52 | name = "com_google_guava_guava_21_0_with_file",
|
49 | 53 | artifact = "com.google.guava:guava:21.0",
|
50 |
| - sha1 = "3a3d111be1be1b745edfa7d91678a12d7ed38709" |
| 54 | + sha1 = "3a3d111be1be1b745edfa7d91678a12d7ed38709", |
51 | 55 | )
|
52 | 56 |
|
53 | 57 | maven_jar(
|
54 | 58 | name = "org_apache_commons_commons_lang_3_5",
|
55 | 59 | artifact = "org.apache.commons:commons-lang3:3.5",
|
56 |
| - sha1 = "6c6c702c89bfff3cd9e80b04d668c5e190d588c6" |
| 60 | + sha1 = "6c6c702c89bfff3cd9e80b04d668c5e190d588c6", |
57 | 61 | )
|
58 | 62 |
|
59 | 63 | http_archive(
|
60 | 64 | name = "com_google_protobuf",
|
61 |
| - urls = ["https://github.com/google/protobuf/archive/0456e269ee6505766474aa8d7b8bba7ac047f457.zip"], |
62 |
| - strip_prefix = "protobuf-0456e269ee6505766474aa8d7b8bba7ac047f457", |
63 | 65 | sha256 = "118ac276be0db540ff2a89cecc5dfb9606d4d16e91cc4ea8883ae8160acb5163",
|
| 66 | + strip_prefix = "protobuf-0456e269ee6505766474aa8d7b8bba7ac047f457", |
| 67 | + urls = ["https://github.com/google/protobuf/archive/0456e269ee6505766474aa8d7b8bba7ac047f457.zip"], |
64 | 68 | )
|
65 | 69 |
|
66 | 70 | http_archive(
|
67 | 71 | name = "com_google_protobuf_java",
|
68 |
| - urls = ["https://github.com/google/protobuf/archive/0456e269ee6505766474aa8d7b8bba7ac047f457.zip"], |
69 |
| - strip_prefix = "protobuf-0456e269ee6505766474aa8d7b8bba7ac047f457", |
70 | 72 | sha256 = "118ac276be0db540ff2a89cecc5dfb9606d4d16e91cc4ea8883ae8160acb5163",
|
| 73 | + strip_prefix = "protobuf-0456e269ee6505766474aa8d7b8bba7ac047f457", |
| 74 | + urls = ["https://github.com/google/protobuf/archive/0456e269ee6505766474aa8d7b8bba7ac047f457.zip"], |
71 | 75 | )
|
72 | 76 |
|
73 | 77 | new_local_repository(
|
74 | 78 | name = "test_new_local_repo",
|
75 |
| - path = "third_party/test/new_local_repo", |
76 |
| - build_file_content = |
77 |
| -""" |
| 79 | + build_file_content = |
| 80 | + """ |
78 | 81 | filegroup(
|
79 | 82 | name = "data",
|
80 | 83 | srcs = glob(["**/*.txt"]),
|
81 | 84 | visibility = ["//visibility:public"],
|
82 | 85 | )
|
83 |
| -""" |
| 86 | +""", |
| 87 | + path = "third_party/test/new_local_repo", |
84 | 88 | )
|
85 | 89 |
|
86 |
| -load("@io_bazel_rules_scala//scala:toolchains.bzl","scala_register_toolchains") |
| 90 | +load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains") |
| 91 | + |
87 | 92 | scala_register_toolchains()
|
88 | 93 |
|
89 | 94 | load("//scala:scala_maven_import_external.bzl", "scala_maven_import_external", "java_import_external")
|
| 95 | + |
90 | 96 | scala_maven_import_external(
|
91 | 97 | name = "com_google_guava_guava_21_0",
|
92 |
| - licenses = ["notice"], # Apache 2.0 |
93 | 98 | artifact = "com.google.guava:guava:21.0",
|
94 |
| - server_urls = ["https://mirror.bazel.build/repo1.maven.org/maven2"], |
95 | 99 | jar_sha256 = "972139718abc8a4893fa78cba8cf7b2c903f35c97aaf44fa3031b0669948b480",
|
| 100 | + licenses = ["notice"], # Apache 2.0 |
| 101 | + server_urls = ["https://mirror.bazel.build/repo1.maven.org/maven2"], |
96 | 102 | )
|
97 | 103 |
|
98 | 104 | # bazel's java_import_external has been altered in rules_scala to be a macro based on jvm_import_external
|
99 | 105 | # in order to allow for other jvm-language imports (e.g. scala_import)
|
100 | 106 | # the 3rd-party dependency below is using the java_import_external macro
|
101 | 107 | # in order to make sure no regression with the original java_import_external
|
102 | 108 | load("//scala:scala_maven_import_external.bzl", "java_import_external")
|
| 109 | + |
103 | 110 | java_import_external(
|
104 | 111 | name = "org_apache_commons_commons_lang_3_5_without_file",
|
105 |
| - licenses = ["notice"], # Apache 2.0 |
106 |
| - jar_urls = ["http://central.maven.org/maven2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar"], |
| 112 | + generated_linkable_rule_name = "linkable_org_apache_commons_commons_lang_3_5_without_file", |
107 | 113 | jar_sha256 = "8ac96fc686512d777fca85e144f196cd7cfe0c0aec23127229497d1a38ff651c",
|
| 114 | + jar_urls = ["http://central.maven.org/maven2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar"], |
| 115 | + licenses = ["notice"], # Apache 2.0 |
108 | 116 | neverlink = True,
|
109 |
| - generated_linkable_rule_name="linkable_org_apache_commons_commons_lang_3_5_without_file", |
110 | 117 | )
|
| 118 | + |
| 119 | +## Linting |
| 120 | + |
| 121 | +load("//private:format.bzl", "format_repositories") |
| 122 | + |
| 123 | +format_repositories() |
0 commit comments