Skip to content

Commit

Permalink
Replace jar_sha256 with artifact_sha256. (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminp authored and johnynek committed Jul 25, 2019
1 parent b3a75fd commit 5db90f9
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 62 deletions.
12 changes: 6 additions & 6 deletions jmh/jmh.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def jmh_repositories(maven_servers = ["http://central.maven.org/maven2"]):
_scala_maven_import_external(
name = "io_bazel_rules_scala_org_openjdk_jmh_jmh_core",
artifact = "org.openjdk.jmh:jmh-core:1.20",
jar_sha256 = "1688db5110ea6413bf63662113ed38084106ab1149e020c58c5ac22b91b842ca",
artifact_sha256 = "1688db5110ea6413bf63662113ed38084106ab1149e020c58c5ac22b91b842ca",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -19,7 +19,7 @@ def jmh_repositories(maven_servers = ["http://central.maven.org/maven2"]):
_scala_maven_import_external(
name = "io_bazel_rules_scala_org_openjdk_jmh_jmh_generator_asm",
artifact = "org.openjdk.jmh:jmh-generator-asm:1.20",
jar_sha256 = "2dd4798b0c9120326310cda3864cc2e0035b8476346713d54a28d1adab1414a5",
artifact_sha256 = "2dd4798b0c9120326310cda3864cc2e0035b8476346713d54a28d1adab1414a5",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -30,7 +30,7 @@ def jmh_repositories(maven_servers = ["http://central.maven.org/maven2"]):
_scala_maven_import_external(
name = "io_bazel_rules_scala_org_openjdk_jmh_jmh_generator_reflection",
artifact = "org.openjdk.jmh:jmh-generator-reflection:1.20",
jar_sha256 = "57706f7c8278272594a9afc42753aaf9ba0ba05980bae0673b8195908d21204e",
artifact_sha256 = "57706f7c8278272594a9afc42753aaf9ba0ba05980bae0673b8195908d21204e",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -42,7 +42,7 @@ def jmh_repositories(maven_servers = ["http://central.maven.org/maven2"]):
_scala_maven_import_external(
name = "io_bazel_rules_scala_org_ows2_asm_asm",
artifact = "org.ow2.asm:asm:6.1.1",
jar_sha256 = "dd3b546415dd4bade2ebe3b47c7828ab0623ee2336604068e2d81023f9f8d833",
artifact_sha256 = "dd3b546415dd4bade2ebe3b47c7828ab0623ee2336604068e2d81023f9f8d833",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -53,7 +53,7 @@ def jmh_repositories(maven_servers = ["http://central.maven.org/maven2"]):
_scala_maven_import_external(
name = "io_bazel_rules_scala_net_sf_jopt_simple_jopt_simple",
artifact = "net.sf.jopt-simple:jopt-simple:5.0.3",
jar_sha256 = "6f45c00908265947c39221035250024f2caec9a15c1c8cf553ebeecee289f342",
artifact_sha256 = "6f45c00908265947c39221035250024f2caec9a15c1c8cf553ebeecee289f342",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -65,7 +65,7 @@ def jmh_repositories(maven_servers = ["http://central.maven.org/maven2"]):
_scala_maven_import_external(
name = "io_bazel_rules_scala_org_apache_commons_commons_math3",
artifact = "org.apache.commons:commons-math3:3.6.1",
jar_sha256 = "1e56d7b058d28b65abd256b8458e3885b674c1d588fa43cd7d1cbb9c7ef2b308",
artifact_sha256 = "1e56d7b058d28b65abd256b8458e3885b674c1d588fa43cd7d1cbb9c7ef2b308",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand Down
4 changes: 2 additions & 2 deletions junit/junit.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def junit_repositories(maven_servers = ["http://central.maven.org/maven2"]):
_scala_maven_import_external(
name = "io_bazel_rules_scala_junit_junit",
artifact = "junit:junit:4.12",
jar_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
artifact_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -19,7 +19,7 @@ def junit_repositories(maven_servers = ["http://central.maven.org/maven2"]):
_scala_maven_import_external(
name = "io_bazel_rules_scala_org_hamcrest_hamcrest_core",
artifact = "org.hamcrest:hamcrest-core:1.3",
jar_sha256 = "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9",
artifact_sha256 = "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand Down
12 changes: 6 additions & 6 deletions scala/scala.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def scala_repositories(
major_version = major_version,
extra_jar_version = scala_version_extra_jars["scalatest"]["version"],
),
jar_sha256 = scala_version_extra_jars["scalatest"]["sha256"],
artifact_sha256 = scala_version_extra_jars["scalatest"]["sha256"],
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -447,7 +447,7 @@ def scala_repositories(
major_version = major_version,
extra_jar_version = scala_version_extra_jars["scalactic"]["version"],
),
jar_sha256 = scala_version_extra_jars["scalactic"]["sha256"],
artifact_sha256 = scala_version_extra_jars["scalactic"]["sha256"],
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -458,7 +458,7 @@ def scala_repositories(
major_version = major_version,
extra_jar_version = scala_version_extra_jars["scala_xml"]["version"],
),
jar_sha256 = scala_version_extra_jars["scala_xml"]["sha256"],
artifact_sha256 = scala_version_extra_jars["scala_xml"]["sha256"],
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -470,7 +470,7 @@ def scala_repositories(
major_version = major_version,
extra_jar_version = scala_version_extra_jars["scala_parser_combinators"]["version"],
),
jar_sha256 = scala_version_extra_jars["scala_parser_combinators"]["sha256"],
artifact_sha256 = scala_version_extra_jars["scala_parser_combinators"]["sha256"],
licenses = ["notice"],
server_urls = maven_servers,
)
Expand All @@ -479,15 +479,15 @@ def scala_repositories(
_scala_maven_import_external(
name = "scalac_rules_commons_io",
artifact = "commons-io:commons-io:2.6",
jar_sha256 = "f877d304660ac2a142f3865badfc971dec7ed73c747c7f8d5d2f5139ca736513",
artifact_sha256 = "f877d304660ac2a142f3865badfc971dec7ed73c747c7f8d5d2f5139ca736513",
licenses = ["notice"],
server_urls = maven_servers,
)

_scala_maven_import_external(
name = "io_bazel_rules_scala_guava",
artifact = "com.google.guava:guava:21.0",
jar_sha256 = "972139718abc8a4893fa78cba8cf7b2c903f35c97aaf44fa3031b0669948b480",
artifact_sha256 = "972139718abc8a4893fa78cba8cf7b2c903f35c97aaf44fa3031b0669948b480",
licenses = ["notice"],
server_urls = maven_servers,
)
Expand Down
6 changes: 3 additions & 3 deletions scala/scala_cross_version.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ def new_scala_default_repository(
_scala_maven_import_external(
name = "io_bazel_rules_scala_scala_library",
artifact = "org.scala-lang:scala-library:{}".format(scala_version),
jar_sha256 = scala_version_jar_shas["scala_library"],
artifact_sha256 = scala_version_jar_shas["scala_library"],
licenses = ["notice"],
server_urls = maven_servers,
)
_scala_maven_import_external(
name = "io_bazel_rules_scala_scala_compiler",
artifact = "org.scala-lang:scala-compiler:{}".format(scala_version),
jar_sha256 = scala_version_jar_shas["scala_compiler"],
artifact_sha256 = scala_version_jar_shas["scala_compiler"],
licenses = ["notice"],
server_urls = maven_servers,
)
_scala_maven_import_external(
name = "io_bazel_rules_scala_scala_reflect",
artifact = "org.scala-lang:scala-reflect:{}".format(scala_version),
jar_sha256 = scala_version_jar_shas["scala_reflect"],
artifact_sha256 = scala_version_jar_shas["scala_reflect"],
licenses = ["notice"],
server_urls = maven_servers,
)
9 changes: 4 additions & 5 deletions scala/scala_maven_import_external.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ java_import_external(
"http://repo1.maven.org/maven2/com/google/guava/guava/20.0/guava-20.0.jar",
"http://maven.ibiblio.org/maven2/com/google/guava/guava/20.0/guava-20.0.jar",
],
jar_sha256 = "36a666e3b71ae7f0f0dca23654b67e086e6c93d192f60ba5dfd5519db6c288c8",
artifact_sha256 = "36a666e3b71ae7f0f0dca23654b67e086e6c93d192f60ba5dfd5519db6c288c8",
deps = [
"@com_google_code_findbugs_jsr305",
"@com_google_errorprone_error_prone_annotations",
Expand All @@ -397,13 +397,13 @@ java_import_external(
"http://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar",
"http://maven.ibiblio.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar",
],
jar_sha256 = "905721a0eea90a81534abb7ee6ef4ea2e5e645fa1def0a5cd88402df1b46c9ed",
artifact_sha256 = "905721a0eea90a81534abb7ee6ef4ea2e5e645fa1def0a5cd88402df1b46c9ed",
)
java_import_external(
name = "com_google_errorprone_error_prone_annotations",
licenses = ["notice"], # Apache 2.0
jar_sha256 = "e7749ffdf03fb8ebe08a727ea205acb301c8791da837fee211b99b04f9d79c46",
artifact_sha256 = "e7749ffdf03fb8ebe08a727ea205acb301c8791da837fee211b99b04f9d79c46",
jar_urls = [
"http://bazel-mirror.storage.googleapis.com/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.0.15/error_prone_annotations-2.0.15.jar",
"http://maven.ibiblio.org/maven2/com/google/errorprone/error_prone_annotations/2.0.15/error_prone_annotations-2.0.15.jar",
Expand Down Expand Up @@ -440,9 +440,8 @@ will be loaded into a runtime environment where certain dependencies can be
reasonably expected to already be provided.
"""

def java_import_external(jar_sha256, **kwargs):
def java_import_external(**kwargs):
jvm_import_external(
rule_name = "java_import",
jar_sha256 = jar_sha256,
**kwargs
)
Loading

0 comments on commit 5db90f9

Please sign in to comment.