From e3e82e9aa7a41825d8bcd9b38652bad1fbb823e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Tue, 19 Nov 2019 22:28:03 +0100 Subject: [PATCH 1/7] Add sha256 checksums in jflex/deps.bzl --- jflex/deps.bzl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jflex/deps.bzl b/jflex/deps.bzl index 3b1f628..3a3b7bc 100644 --- a/jflex/deps.bzl +++ b/jflex/deps.bzl @@ -1,17 +1,21 @@ -# Copyright 2018 Google LLC. +# Copyright 2018-2019 Google LLC. # SPDX-License-Identifier: Apache-2.0 def jflex_deps(): - """Bazel macro that iports dependencies used by JFlex.""" + """Bazel macro that imports dependencies used by JFlex.""" native.maven_jar( name = "de_jflex_jflex_1_7_0", artifact = "de.jflex:jflex:1.7.0", repository = "https://jcenter.bintray.com/", + sha256 = "c40e64600f7d29e1618a1c1d5cd697c926ff8495e166ea9416cae19644e37ae6", + sha256_src = "3b18eb44332183ac1fbbf4573da1f2e8a373b71899a9d05a0d70308d5c5a56f3", ) native.maven_jar( name = "de_jflex_cup_runtime_11b", artifact = "de.jflex:cup_runtime:11b", repository = "https://jcenter.bintray.com/", + sha256 = "9c0b5c93fe0c0e239d5f92affb672cb7c45122c3e3de8cda9513fa8e39dbbc3c", + sha256_src = "7155a72ab7b2d6c1ecf129bcacfbe942d0b490bfe1d634532e5619a836e17591", ) From 8bf4ea1c7453c845ca668aee0ea0f4d76ad8e9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Tue, 19 Nov 2019 22:34:34 +0100 Subject: [PATCH 2/7] Use maven_install for third-party deps --- WORKSPACE | 28 ++++++++++++++++++++++++++-- jflex/deps.bzl | 2 ++ third_party/com/google/guava/BUILD | 2 +- third_party/com/google/truth/BUILD | 9 ++------- third_party/third_party_deps.bzl | 16 ++++------------ 5 files changed, 35 insertions(+), 22 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index fa1b745..e2515ae 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,8 +5,32 @@ # See https://docs.bazel.build/versions/master/build-ref.html#workspace load("//jflex:deps.bzl", "jflex_deps") -load("//third_party:third_party_deps.bzl", "third_party_deps") +load("//third_party:third_party_deps.bzl", "THIRD_PARTY_DEPS") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +RULES_JVM_EXTERNAL_TAG = "2.10" + +RULES_JVM_EXTERNAL_SHA = "1bbf2e48d07686707dd85357e9a94da775e1dbd7c464272b3664283c9c716d26" + +http_archive( + name = "rules_jvm_external", + sha256 = RULES_JVM_EXTERNAL_SHA, + strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, + url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, +) + +load("@rules_jvm_external//:defs.bzl", "maven_install") jflex_deps() -third_party_deps() +maven_install( + name = "maven_jflex", + artifacts = THIRD_PARTY_DEPS, + repositories = [ + # Private repositories are supported through HTTP Basic auth + "http://username:password@localhost:8081/artifactory/my-repository", + "https://jcenter.bintray.com/", + "https://maven.google.com", + "https://repo1.maven.org/maven2", + ], +) diff --git a/jflex/deps.bzl b/jflex/deps.bzl index 3a3b7bc..6d1cf1b 100644 --- a/jflex/deps.bzl +++ b/jflex/deps.bzl @@ -1,6 +1,8 @@ # Copyright 2018-2019 Google LLC. # SPDX-License-Identifier: Apache-2.0 +# maven_install can only be used in WORKSPACE, so we will keep the deprecated maven_jar for some +# time. def jflex_deps(): """Bazel macro that imports dependencies used by JFlex.""" diff --git a/third_party/com/google/guava/BUILD b/third_party/com/google/guava/BUILD index 0b5cf33..27d288f 100644 --- a/third_party/com/google/guava/BUILD +++ b/third_party/com/google/guava/BUILD @@ -6,6 +6,6 @@ licenses(["notice"]) # Apache License 2.0 alias( name = "guava", - actual = "@com_google_guava_guava_26_0_jre//jar", + actual = "@maven_jflex//:com_google_guava_guava_26_0_jre", visibility = ["//visibility:public"], ) diff --git a/third_party/com/google/truth/BUILD b/third_party/com/google/truth/BUILD index 781a8d5..1178bdf 100644 --- a/third_party/com/google/truth/BUILD +++ b/third_party/com/google/truth/BUILD @@ -4,13 +4,8 @@ licenses(["notice"]) # Apache License 2.0 -java_library( +alias( name = "truth", + actual = "@maven_jflex//:com_google_truth_truth_0_42", visibility = ["//visibility:public"], - exports = [ - "@com_google_truth_truth//jar", - # TODO(regisd) This should be a runtime_deps - # But in that case Optional is not found - "//third_party/com/google/guava", - ], ) diff --git a/third_party/third_party_deps.bzl b/third_party/third_party_deps.bzl index ff98abc..fb82fed 100644 --- a/third_party/third_party_deps.bzl +++ b/third_party/third_party_deps.bzl @@ -1,13 +1,5 @@ # Please keep deps in alphabetical order -def third_party_deps(): - - native.maven_jar( - name = "com_google_guava_guava_26_0_jre", - artifact = "com.google.guava:guava:26.0-jre", - repository = "https://jcenter.bintray.com/", - ) - native.maven_jar( - name = "com_google_truth_truth", - artifact = "com.google.truth:truth:0.42", - repository = "https://jcenter.bintray.com/", - ) +THIRD_PARTY_DEPS = [ + "com.google.guava:guava:26.0-jre", + "com.google.truth:truth:0.42", +] From 44e030837d6bf8a48447c4a13d5d42c43b37fb42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Tue, 19 Nov 2019 22:35:45 +0100 Subject: [PATCH 3/7] Upgrade Guava and Truth to latest versions. Guava to 28.1 Truth to 1.0 --- third_party/com/google/guava/BUILD | 2 +- third_party/com/google/truth/BUILD | 2 +- third_party/third_party_deps.bzl | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/third_party/com/google/guava/BUILD b/third_party/com/google/guava/BUILD index 27d288f..100cc50 100644 --- a/third_party/com/google/guava/BUILD +++ b/third_party/com/google/guava/BUILD @@ -6,6 +6,6 @@ licenses(["notice"]) # Apache License 2.0 alias( name = "guava", - actual = "@maven_jflex//:com_google_guava_guava_26_0_jre", + actual = "@maven_jflex//:com_google_guava_guava_28_1_jre", visibility = ["//visibility:public"], ) diff --git a/third_party/com/google/truth/BUILD b/third_party/com/google/truth/BUILD index 1178bdf..f664dd9 100644 --- a/third_party/com/google/truth/BUILD +++ b/third_party/com/google/truth/BUILD @@ -6,6 +6,6 @@ licenses(["notice"]) # Apache License 2.0 alias( name = "truth", - actual = "@maven_jflex//:com_google_truth_truth_0_42", + actual = "@maven_jflex//:com_google_truth_truth_1_0", visibility = ["//visibility:public"], ) diff --git a/third_party/third_party_deps.bzl b/third_party/third_party_deps.bzl index fb82fed..cb37051 100644 --- a/third_party/third_party_deps.bzl +++ b/third_party/third_party_deps.bzl @@ -1,5 +1,5 @@ # Please keep deps in alphabetical order THIRD_PARTY_DEPS = [ - "com.google.guava:guava:26.0-jre", - "com.google.truth:truth:0.42", + "com.google.guava:guava:28.1-jre", + "com.google.truth:truth:1.0", ] From 583a38fd3db643dfcd1ea55daef29f8f0d08e9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Tue, 19 Nov 2019 22:37:09 +0100 Subject: [PATCH 4/7] Pin down versions. --- WORKSPACE | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index e2515ae..6db4890 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -33,4 +33,8 @@ maven_install( "https://maven.google.com", "https://repo1.maven.org/maven2", ], + maven_install_json = "//:maven_jflex_install.json", ) + +load("@maven_jflex//:defs.bzl", "pinned_maven_install") +pinned_maven_install() From c3b26e06a1be24c28429da59ec2c54166168e25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Tue, 19 Nov 2019 21:28:45 +0100 Subject: [PATCH 5/7] Replace maven_jar by maven_install (#14) * Replace `maven_jar` by `maven_install` for third-party deps * Replace `maven_jar` by `maven_install` for JFlex deps. * Replace `java_lib` with exports by `alias` maven_install resolves deps better than the deprecated maven_install. * Update copyright * Pin versions of the deps. * Upgrade third_party deps Guava to 28.1 Truth to 1.0 --- WORKSPACE | 22 +-- cup/cup.bzl | 3 +- jflex/BUILD | 8 +- jflex/deps.bzl | 25 +-- jflex/jflex.bzl | 3 +- maven_install.json | 295 +++++++++++++++++++++++++++++ third_party/com/google/guava/BUILD | 5 +- third_party/com/google/truth/BUILD | 5 +- third_party/third_party_deps.bzl | 5 +- 9 files changed, 328 insertions(+), 43 deletions(-) create mode 100644 maven_install.json diff --git a/WORKSPACE b/WORKSPACE index 6db4890..c2a2de9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,11 +1,11 @@ -# Copyright 2018 Google LLC. +# Copyright 2018-2019 Google LLC. # SPDX-License-Identifier: Apache-2.0 # This WORKSPACE file defines the workspace for the Bazel build system. # See https://docs.bazel.build/versions/master/build-ref.html#workspace -load("//jflex:deps.bzl", "jflex_deps") -load("//third_party:third_party_deps.bzl", "THIRD_PARTY_DEPS") +load("//jflex:deps.bzl", "JFLEX_DEPS") +load("//third_party:third_party_deps.bzl", "THIRD_PARTY_ARTIFACTS") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") RULES_JVM_EXTERNAL_TAG = "2.10" @@ -21,20 +21,16 @@ http_archive( load("@rules_jvm_external//:defs.bzl", "maven_install") -jflex_deps() - maven_install( - name = "maven_jflex", - artifacts = THIRD_PARTY_DEPS, + name = "maven", + artifacts = THIRD_PARTY_ARTIFACTS + JFLEX_DEPS, repositories = [ - # Private repositories are supported through HTTP Basic auth - "http://username:password@localhost:8081/artifactory/my-repository", "https://jcenter.bintray.com/", - "https://maven.google.com", - "https://repo1.maven.org/maven2", + "https://maven.google.com/", + "https://repo1.maven.org/maven2/", ], - maven_install_json = "//:maven_jflex_install.json", + maven_install_json = "//:maven_install.json", ) -load("@maven_jflex//:defs.bzl", "pinned_maven_install") +load("@maven//:defs.bzl", "pinned_maven_install") pinned_maven_install() diff --git a/cup/cup.bzl b/cup/cup.bzl index c1f85fb..2fa0fe4 100644 --- a/cup/cup.bzl +++ b/cup/cup.bzl @@ -1,4 +1,5 @@ -# Copyright (C) 2018 Google LLC. +# Copyright 2018-2019 Google LLC. +# SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/jflex/BUILD b/jflex/BUILD index 52e51dd..1da63a9 100644 --- a/jflex/BUILD +++ b/jflex/BUILD @@ -14,12 +14,12 @@ java_binary( ], ) -java_library( +alias( name = "jflex", - exports = ["@de_jflex_jflex_1_7_0//jar"], + actual = "@maven//:de_jflex_jflex_1_7_0", ) -java_library( +alias( name = "cup_runtime", - exports = ["@de_jflex_cup_runtime_11b//jar"], + actual = "@maven//:de_jflex_cup_runtime_11b", ) diff --git a/jflex/deps.bzl b/jflex/deps.bzl index 6d1cf1b..11bf008 100644 --- a/jflex/deps.bzl +++ b/jflex/deps.bzl @@ -1,23 +1,6 @@ # Copyright 2018-2019 Google LLC. # SPDX-License-Identifier: Apache-2.0 - -# maven_install can only be used in WORKSPACE, so we will keep the deprecated maven_jar for some -# time. -def jflex_deps(): - """Bazel macro that imports dependencies used by JFlex.""" - - native.maven_jar( - name = "de_jflex_jflex_1_7_0", - artifact = "de.jflex:jflex:1.7.0", - repository = "https://jcenter.bintray.com/", - sha256 = "c40e64600f7d29e1618a1c1d5cd697c926ff8495e166ea9416cae19644e37ae6", - sha256_src = "3b18eb44332183ac1fbbf4573da1f2e8a373b71899a9d05a0d70308d5c5a56f3", - ) - - native.maven_jar( - name = "de_jflex_cup_runtime_11b", - artifact = "de.jflex:cup_runtime:11b", - repository = "https://jcenter.bintray.com/", - sha256 = "9c0b5c93fe0c0e239d5f92affb672cb7c45122c3e3de8cda9513fa8e39dbbc3c", - sha256_src = "7155a72ab7b2d6c1ecf129bcacfbe942d0b490bfe1d634532e5619a836e17591", - ) +JFLEX_DEPS = [ + "de.jflex:jflex:1.7.0", + "de.jflex:cup_runtime:11b", +] diff --git a/jflex/jflex.bzl b/jflex/jflex.bzl index bf5f7e4..2ea2e2b 100644 --- a/jflex/jflex.bzl +++ b/jflex/jflex.bzl @@ -1,4 +1,5 @@ -# Copyright (C) 2018 Google LLC. +# Copyright 2018-2019 Google LLC. +# SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/maven_install.json b/maven_install.json new file mode 100644 index 0000000..06f678e --- /dev/null +++ b/maven_install.json @@ -0,0 +1,295 @@ +{ + "dependency_tree": { + "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": 1778371561, + "conflict_resolution": {}, + "dependencies": [ + { + "coord": "com.google.auto.value:auto-value-annotations:1.6.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar", + "https://maven.google.com/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar", + "https://repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar" + ], + "sha256": "0e951fee8c31f60270bc46553a8586001b7b93dbb12aec06373aa99a150392c0", + "url": "https://jcenter.bintray.com/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar" + }, + { + "coord": "com.google.code.findbugs:jsr305:3.0.2", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", + "https://maven.google.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", + "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar" + ], + "sha256": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7", + "url": "https://jcenter.bintray.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar" + }, + { + "coord": "com.google.errorprone:error_prone_annotations:2.3.2", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar", + "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar", + "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar" + ], + "sha256": "357cd6cfb067c969226c442451502aee13800a24e950fdfde77bcdb4565a668d", + "url": "https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar" + }, + { + "coord": "com.google.guava:failureaccess:1.0.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" + ], + "sha256": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26", + "url": "https://jcenter.bintray.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" + }, + { + "coord": "com.google.guava:guava:28.1-jre", + "dependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "org.codehaus.mojo:animal-sniffer-annotations:1.18", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "org.checkerframework:checker-qual:2.8.1", + "com.google.guava:failureaccess:1.0.1", + "com.google.errorprone:error_prone_annotations:2.3.2" + ], + "directDependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "org.codehaus.mojo:animal-sniffer-annotations:1.18", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "org.checkerframework:checker-qual:2.8.1", + "com.google.guava:failureaccess:1.0.1", + "com.google.errorprone:error_prone_annotations:2.3.2" + ], + "file": "v1/https/jcenter.bintray.com/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar", + "https://maven.google.com/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar", + "https://repo1.maven.org/maven2/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar" + ], + "sha256": "30beb8b8527bd07c6e747e77f1a92122c2f29d57ce347461a4a55eb26e382da4", + "url": "https://jcenter.bintray.com/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar" + }, + { + "coord": "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "https://maven.google.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" + ], + "sha256": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99", + "url": "https://jcenter.bintray.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" + }, + { + "coord": "com.google.j2objc:j2objc-annotations:1.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" + ], + "sha256": "21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b", + "url": "https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" + }, + { + "coord": "com.google.truth:truth:1.0", + "dependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "org.codehaus.mojo:animal-sniffer-annotations:1.18", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.guava:guava:28.1-jre", + "junit:junit:4.12", + "org.hamcrest:hamcrest-core:1.3", + "org.checkerframework:checker-qual:2.8.1", + "com.googlecode.java-diff-utils:diffutils:1.3.0", + "com.google.guava:failureaccess:1.0.1", + "com.google.errorprone:error_prone_annotations:2.3.2", + "com.google.auto.value:auto-value-annotations:1.6.3", + "org.checkerframework:checker-compat-qual:2.5.5" + ], + "directDependencies": [ + "com.google.guava:guava:28.1-jre", + "junit:junit:4.12", + "com.googlecode.java-diff-utils:diffutils:1.3.0", + "com.google.errorprone:error_prone_annotations:2.3.2", + "com.google.auto.value:auto-value-annotations:1.6.3", + "org.checkerframework:checker-compat-qual:2.5.5" + ], + "file": "v1/https/jcenter.bintray.com/com/google/truth/truth/1.0/truth-1.0.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/google/truth/truth/1.0/truth-1.0.jar", + "https://maven.google.com/com/google/truth/truth/1.0/truth-1.0.jar", + "https://repo1.maven.org/maven2/com/google/truth/truth/1.0/truth-1.0.jar" + ], + "sha256": "edaa12f3b581fcf1c07311e94af8766919c4f3d904b00d3503147b99bf5b4004", + "url": "https://jcenter.bintray.com/com/google/truth/truth/1.0/truth-1.0.jar" + }, + { + "coord": "com.googlecode.java-diff-utils:diffutils:1.3.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar", + "https://maven.google.com/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar", + "https://repo1.maven.org/maven2/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar" + ], + "sha256": "61ba4dc49adca95243beaa0569adc2a23aedb5292ae78aa01186fa782ebdc5c2", + "url": "https://jcenter.bintray.com/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar" + }, + { + "coord": "de.jflex:cup_runtime:11b", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/de/jflex/cup_runtime/11b/cup_runtime-11b.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/de/jflex/cup_runtime/11b/cup_runtime-11b.jar", + "https://maven.google.com/de/jflex/cup_runtime/11b/cup_runtime-11b.jar", + "https://repo1.maven.org/maven2/de/jflex/cup_runtime/11b/cup_runtime-11b.jar" + ], + "sha256": "9c0b5c93fe0c0e239d5f92affb672cb7c45122c3e3de8cda9513fa8e39dbbc3c", + "url": "https://jcenter.bintray.com/de/jflex/cup_runtime/11b/cup_runtime-11b.jar" + }, + { + "coord": "de.jflex:jflex:1.7.0", + "dependencies": [ + "de.jflex:cup_runtime:11b", + "org.apache.ant:ant:1.9.7", + "org.apache.ant:ant-launcher:1.9.7" + ], + "directDependencies": [ + "de.jflex:cup_runtime:11b", + "org.apache.ant:ant:1.9.7" + ], + "file": "v1/https/jcenter.bintray.com/de/jflex/jflex/1.7.0/jflex-1.7.0.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/de/jflex/jflex/1.7.0/jflex-1.7.0.jar", + "https://maven.google.com/de/jflex/jflex/1.7.0/jflex-1.7.0.jar", + "https://repo1.maven.org/maven2/de/jflex/jflex/1.7.0/jflex-1.7.0.jar" + ], + "sha256": "c40e64600f7d29e1618a1c1d5cd697c926ff8495e166ea9416cae19644e37ae6", + "url": "https://jcenter.bintray.com/de/jflex/jflex/1.7.0/jflex-1.7.0.jar" + }, + { + "coord": "junit:junit:4.12", + "dependencies": [ + "org.hamcrest:hamcrest-core:1.3" + ], + "directDependencies": [ + "org.hamcrest:hamcrest-core:1.3" + ], + "file": "v1/https/jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar", + "https://maven.google.com/junit/junit/4.12/junit-4.12.jar", + "https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar" + ], + "sha256": "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a", + "url": "https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar" + }, + { + "coord": "org.apache.ant:ant-launcher:1.9.7", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar", + "https://maven.google.com/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar", + "https://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar" + ], + "sha256": "bc376f6d6cb586229f451ac459faf1443b144c26d6647618ec9cba60e54c2b79", + "url": "https://jcenter.bintray.com/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar" + }, + { + "coord": "org.apache.ant:ant:1.9.7", + "dependencies": [ + "org.apache.ant:ant-launcher:1.9.7" + ], + "directDependencies": [ + "org.apache.ant:ant-launcher:1.9.7" + ], + "file": "v1/https/jcenter.bintray.com/org/apache/ant/ant/1.9.7/ant-1.9.7.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/org/apache/ant/ant/1.9.7/ant-1.9.7.jar", + "https://maven.google.com/org/apache/ant/ant/1.9.7/ant-1.9.7.jar", + "https://repo1.maven.org/maven2/org/apache/ant/ant/1.9.7/ant-1.9.7.jar" + ], + "sha256": "9a5dbe3f5f2cb91854c8682cab80178afa412ab35a5ab718bf39ce01b3435d93", + "url": "https://jcenter.bintray.com/org/apache/ant/ant/1.9.7/ant-1.9.7.jar" + }, + { + "coord": "org.checkerframework:checker-compat-qual:2.5.5", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar", + "https://maven.google.com/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar", + "https://repo1.maven.org/maven2/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar" + ], + "sha256": "11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a", + "url": "https://jcenter.bintray.com/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar" + }, + { + "coord": "org.checkerframework:checker-qual:2.8.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar", + "https://maven.google.com/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar", + "https://repo1.maven.org/maven2/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar" + ], + "sha256": "9103499008bcecd4e948da29b17864abb64304e15706444ae209d17ebe0575df", + "url": "https://jcenter.bintray.com/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar" + }, + { + "coord": "org.codehaus.mojo:animal-sniffer-annotations:1.18", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar", + "https://maven.google.com/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar", + "https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar" + ], + "sha256": "47f05852b48ee9baefef80fa3d8cea60efa4753c0013121dd7fe5eef2e5c729d", + "url": "https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar" + }, + { + "coord": "org.hamcrest:hamcrest-core:1.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", + "mirror_urls": [ + "https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", + "https://maven.google.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", + "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" + ], + "sha256": "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9", + "url": "https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" + } + ], + "version": "0.1.0" + } +} diff --git a/third_party/com/google/guava/BUILD b/third_party/com/google/guava/BUILD index 100cc50..7d4c6e4 100644 --- a/third_party/com/google/guava/BUILD +++ b/third_party/com/google/guava/BUILD @@ -1,3 +1,6 @@ +# Copyright 2018-2019 Google LLC. +# SPDX-License-Identifier: Apache-2.0 + # Google Guava # Google core libraries for Java # https://github.com/google/guava @@ -6,6 +9,6 @@ licenses(["notice"]) # Apache License 2.0 alias( name = "guava", - actual = "@maven_jflex//:com_google_guava_guava_28_1_jre", + actual = "@maven//:com_google_guava_guava_28_1_jre", visibility = ["//visibility:public"], ) diff --git a/third_party/com/google/truth/BUILD b/third_party/com/google/truth/BUILD index f664dd9..7076e59 100644 --- a/third_party/com/google/truth/BUILD +++ b/third_party/com/google/truth/BUILD @@ -1,3 +1,6 @@ +# Copyright 2018-2019 Google LLC. +# SPDX-License-Identifier: Apache-2.0 + # Google truth # Fluent assertions for Java tests # http://google.github.io/truth/ @@ -6,6 +9,6 @@ licenses(["notice"]) # Apache License 2.0 alias( name = "truth", - actual = "@maven_jflex//:com_google_truth_truth_1_0", + actual = "@maven//:com_google_truth_truth_1_0", visibility = ["//visibility:public"], ) diff --git a/third_party/third_party_deps.bzl b/third_party/third_party_deps.bzl index cb37051..20b5fb0 100644 --- a/third_party/third_party_deps.bzl +++ b/third_party/third_party_deps.bzl @@ -1,5 +1,8 @@ +# Copyright 2018-2019 Google LLC. +# SPDX-License-Identifier: Apache-2.0 + # Please keep deps in alphabetical order -THIRD_PARTY_DEPS = [ +THIRD_PARTY_ARTIFACTS = [ "com.google.guava:guava:28.1-jre", "com.google.truth:truth:1.0", ] From 949817bcfeec4e77e2090ec89a1c6637abaf005f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Tue, 19 Nov 2019 22:40:34 +0100 Subject: [PATCH 6/7] Revert "Replace maven_jar by maven_install (#14)" This reverts commit c786108f4c5353dfbb9fd17e0bd2e0c2852e6f84. The `maven_install` rule needs to be defined in the WORKSPACE which makes a breaking change for projects using `jflex_deps()`. --- WORKSPACE | 34 +--- cup/cup.bzl | 3 +- jflex/BUILD | 8 +- jflex/deps.bzl | 21 +- jflex/jflex.bzl | 3 +- maven_install.json | 295 ----------------------------- third_party/com/google/guava/BUILD | 5 +- third_party/com/google/truth/BUILD | 12 +- third_party/third_party_deps.bzl | 19 +- 9 files changed, 47 insertions(+), 353 deletions(-) delete mode 100644 maven_install.json diff --git a/WORKSPACE b/WORKSPACE index c2a2de9..fa1b745 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,36 +1,12 @@ -# Copyright 2018-2019 Google LLC. +# Copyright 2018 Google LLC. # SPDX-License-Identifier: Apache-2.0 # This WORKSPACE file defines the workspace for the Bazel build system. # See https://docs.bazel.build/versions/master/build-ref.html#workspace -load("//jflex:deps.bzl", "JFLEX_DEPS") -load("//third_party:third_party_deps.bzl", "THIRD_PARTY_ARTIFACTS") -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("//jflex:deps.bzl", "jflex_deps") +load("//third_party:third_party_deps.bzl", "third_party_deps") -RULES_JVM_EXTERNAL_TAG = "2.10" +jflex_deps() -RULES_JVM_EXTERNAL_SHA = "1bbf2e48d07686707dd85357e9a94da775e1dbd7c464272b3664283c9c716d26" - -http_archive( - name = "rules_jvm_external", - sha256 = RULES_JVM_EXTERNAL_SHA, - strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, - url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, -) - -load("@rules_jvm_external//:defs.bzl", "maven_install") - -maven_install( - name = "maven", - artifacts = THIRD_PARTY_ARTIFACTS + JFLEX_DEPS, - repositories = [ - "https://jcenter.bintray.com/", - "https://maven.google.com/", - "https://repo1.maven.org/maven2/", - ], - maven_install_json = "//:maven_install.json", -) - -load("@maven//:defs.bzl", "pinned_maven_install") -pinned_maven_install() +third_party_deps() diff --git a/cup/cup.bzl b/cup/cup.bzl index 2fa0fe4..c1f85fb 100644 --- a/cup/cup.bzl +++ b/cup/cup.bzl @@ -1,5 +1,4 @@ -# Copyright 2018-2019 Google LLC. -# SPDX-License-Identifier: Apache-2.0 +# Copyright (C) 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/jflex/BUILD b/jflex/BUILD index 1da63a9..52e51dd 100644 --- a/jflex/BUILD +++ b/jflex/BUILD @@ -14,12 +14,12 @@ java_binary( ], ) -alias( +java_library( name = "jflex", - actual = "@maven//:de_jflex_jflex_1_7_0", + exports = ["@de_jflex_jflex_1_7_0//jar"], ) -alias( +java_library( name = "cup_runtime", - actual = "@maven//:de_jflex_cup_runtime_11b", + exports = ["@de_jflex_cup_runtime_11b//jar"], ) diff --git a/jflex/deps.bzl b/jflex/deps.bzl index 11bf008..3b1f628 100644 --- a/jflex/deps.bzl +++ b/jflex/deps.bzl @@ -1,6 +1,17 @@ -# Copyright 2018-2019 Google LLC. +# Copyright 2018 Google LLC. # SPDX-License-Identifier: Apache-2.0 -JFLEX_DEPS = [ - "de.jflex:jflex:1.7.0", - "de.jflex:cup_runtime:11b", -] + +def jflex_deps(): + """Bazel macro that iports dependencies used by JFlex.""" + + native.maven_jar( + name = "de_jflex_jflex_1_7_0", + artifact = "de.jflex:jflex:1.7.0", + repository = "https://jcenter.bintray.com/", + ) + + native.maven_jar( + name = "de_jflex_cup_runtime_11b", + artifact = "de.jflex:cup_runtime:11b", + repository = "https://jcenter.bintray.com/", + ) diff --git a/jflex/jflex.bzl b/jflex/jflex.bzl index 2ea2e2b..bf5f7e4 100644 --- a/jflex/jflex.bzl +++ b/jflex/jflex.bzl @@ -1,5 +1,4 @@ -# Copyright 2018-2019 Google LLC. -# SPDX-License-Identifier: Apache-2.0 +# Copyright (C) 2018 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/maven_install.json b/maven_install.json deleted file mode 100644 index 06f678e..0000000 --- a/maven_install.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "dependency_tree": { - "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": 1778371561, - "conflict_resolution": {}, - "dependencies": [ - { - "coord": "com.google.auto.value:auto-value-annotations:1.6.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar", - "https://maven.google.com/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar", - "https://repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar" - ], - "sha256": "0e951fee8c31f60270bc46553a8586001b7b93dbb12aec06373aa99a150392c0", - "url": "https://jcenter.bintray.com/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar" - }, - { - "coord": "com.google.code.findbugs:jsr305:3.0.2", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", - "https://maven.google.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", - "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar" - ], - "sha256": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7", - "url": "https://jcenter.bintray.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar" - }, - { - "coord": "com.google.errorprone:error_prone_annotations:2.3.2", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar", - "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar", - "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar" - ], - "sha256": "357cd6cfb067c969226c442451502aee13800a24e950fdfde77bcdb4565a668d", - "url": "https://jcenter.bintray.com/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar" - }, - { - "coord": "com.google.guava:failureaccess:1.0.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", - "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", - "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" - ], - "sha256": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26", - "url": "https://jcenter.bintray.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" - }, - { - "coord": "com.google.guava:guava:28.1-jre", - "dependencies": [ - "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "org.codehaus.mojo:animal-sniffer-annotations:1.18", - "com.google.j2objc:j2objc-annotations:1.3", - "com.google.code.findbugs:jsr305:3.0.2", - "org.checkerframework:checker-qual:2.8.1", - "com.google.guava:failureaccess:1.0.1", - "com.google.errorprone:error_prone_annotations:2.3.2" - ], - "directDependencies": [ - "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "org.codehaus.mojo:animal-sniffer-annotations:1.18", - "com.google.j2objc:j2objc-annotations:1.3", - "com.google.code.findbugs:jsr305:3.0.2", - "org.checkerframework:checker-qual:2.8.1", - "com.google.guava:failureaccess:1.0.1", - "com.google.errorprone:error_prone_annotations:2.3.2" - ], - "file": "v1/https/jcenter.bintray.com/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar", - "https://maven.google.com/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar", - "https://repo1.maven.org/maven2/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar" - ], - "sha256": "30beb8b8527bd07c6e747e77f1a92122c2f29d57ce347461a4a55eb26e382da4", - "url": "https://jcenter.bintray.com/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar" - }, - { - "coord": "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", - "https://maven.google.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", - "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" - ], - "sha256": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99", - "url": "https://jcenter.bintray.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" - }, - { - "coord": "com.google.j2objc:j2objc-annotations:1.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", - "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", - "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" - ], - "sha256": "21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b", - "url": "https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" - }, - { - "coord": "com.google.truth:truth:1.0", - "dependencies": [ - "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "org.codehaus.mojo:animal-sniffer-annotations:1.18", - "com.google.j2objc:j2objc-annotations:1.3", - "com.google.code.findbugs:jsr305:3.0.2", - "com.google.guava:guava:28.1-jre", - "junit:junit:4.12", - "org.hamcrest:hamcrest-core:1.3", - "org.checkerframework:checker-qual:2.8.1", - "com.googlecode.java-diff-utils:diffutils:1.3.0", - "com.google.guava:failureaccess:1.0.1", - "com.google.errorprone:error_prone_annotations:2.3.2", - "com.google.auto.value:auto-value-annotations:1.6.3", - "org.checkerframework:checker-compat-qual:2.5.5" - ], - "directDependencies": [ - "com.google.guava:guava:28.1-jre", - "junit:junit:4.12", - "com.googlecode.java-diff-utils:diffutils:1.3.0", - "com.google.errorprone:error_prone_annotations:2.3.2", - "com.google.auto.value:auto-value-annotations:1.6.3", - "org.checkerframework:checker-compat-qual:2.5.5" - ], - "file": "v1/https/jcenter.bintray.com/com/google/truth/truth/1.0/truth-1.0.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/google/truth/truth/1.0/truth-1.0.jar", - "https://maven.google.com/com/google/truth/truth/1.0/truth-1.0.jar", - "https://repo1.maven.org/maven2/com/google/truth/truth/1.0/truth-1.0.jar" - ], - "sha256": "edaa12f3b581fcf1c07311e94af8766919c4f3d904b00d3503147b99bf5b4004", - "url": "https://jcenter.bintray.com/com/google/truth/truth/1.0/truth-1.0.jar" - }, - { - "coord": "com.googlecode.java-diff-utils:diffutils:1.3.0", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar", - "https://maven.google.com/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar", - "https://repo1.maven.org/maven2/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar" - ], - "sha256": "61ba4dc49adca95243beaa0569adc2a23aedb5292ae78aa01186fa782ebdc5c2", - "url": "https://jcenter.bintray.com/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar" - }, - { - "coord": "de.jflex:cup_runtime:11b", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/de/jflex/cup_runtime/11b/cup_runtime-11b.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/de/jflex/cup_runtime/11b/cup_runtime-11b.jar", - "https://maven.google.com/de/jflex/cup_runtime/11b/cup_runtime-11b.jar", - "https://repo1.maven.org/maven2/de/jflex/cup_runtime/11b/cup_runtime-11b.jar" - ], - "sha256": "9c0b5c93fe0c0e239d5f92affb672cb7c45122c3e3de8cda9513fa8e39dbbc3c", - "url": "https://jcenter.bintray.com/de/jflex/cup_runtime/11b/cup_runtime-11b.jar" - }, - { - "coord": "de.jflex:jflex:1.7.0", - "dependencies": [ - "de.jflex:cup_runtime:11b", - "org.apache.ant:ant:1.9.7", - "org.apache.ant:ant-launcher:1.9.7" - ], - "directDependencies": [ - "de.jflex:cup_runtime:11b", - "org.apache.ant:ant:1.9.7" - ], - "file": "v1/https/jcenter.bintray.com/de/jflex/jflex/1.7.0/jflex-1.7.0.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/de/jflex/jflex/1.7.0/jflex-1.7.0.jar", - "https://maven.google.com/de/jflex/jflex/1.7.0/jflex-1.7.0.jar", - "https://repo1.maven.org/maven2/de/jflex/jflex/1.7.0/jflex-1.7.0.jar" - ], - "sha256": "c40e64600f7d29e1618a1c1d5cd697c926ff8495e166ea9416cae19644e37ae6", - "url": "https://jcenter.bintray.com/de/jflex/jflex/1.7.0/jflex-1.7.0.jar" - }, - { - "coord": "junit:junit:4.12", - "dependencies": [ - "org.hamcrest:hamcrest-core:1.3" - ], - "directDependencies": [ - "org.hamcrest:hamcrest-core:1.3" - ], - "file": "v1/https/jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar", - "https://maven.google.com/junit/junit/4.12/junit-4.12.jar", - "https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar" - ], - "sha256": "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a", - "url": "https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar" - }, - { - "coord": "org.apache.ant:ant-launcher:1.9.7", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar", - "https://maven.google.com/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar", - "https://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar" - ], - "sha256": "bc376f6d6cb586229f451ac459faf1443b144c26d6647618ec9cba60e54c2b79", - "url": "https://jcenter.bintray.com/org/apache/ant/ant-launcher/1.9.7/ant-launcher-1.9.7.jar" - }, - { - "coord": "org.apache.ant:ant:1.9.7", - "dependencies": [ - "org.apache.ant:ant-launcher:1.9.7" - ], - "directDependencies": [ - "org.apache.ant:ant-launcher:1.9.7" - ], - "file": "v1/https/jcenter.bintray.com/org/apache/ant/ant/1.9.7/ant-1.9.7.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/org/apache/ant/ant/1.9.7/ant-1.9.7.jar", - "https://maven.google.com/org/apache/ant/ant/1.9.7/ant-1.9.7.jar", - "https://repo1.maven.org/maven2/org/apache/ant/ant/1.9.7/ant-1.9.7.jar" - ], - "sha256": "9a5dbe3f5f2cb91854c8682cab80178afa412ab35a5ab718bf39ce01b3435d93", - "url": "https://jcenter.bintray.com/org/apache/ant/ant/1.9.7/ant-1.9.7.jar" - }, - { - "coord": "org.checkerframework:checker-compat-qual:2.5.5", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar", - "https://maven.google.com/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar", - "https://repo1.maven.org/maven2/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar" - ], - "sha256": "11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a", - "url": "https://jcenter.bintray.com/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar" - }, - { - "coord": "org.checkerframework:checker-qual:2.8.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar", - "https://maven.google.com/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar", - "https://repo1.maven.org/maven2/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar" - ], - "sha256": "9103499008bcecd4e948da29b17864abb64304e15706444ae209d17ebe0575df", - "url": "https://jcenter.bintray.com/org/checkerframework/checker-qual/2.8.1/checker-qual-2.8.1.jar" - }, - { - "coord": "org.codehaus.mojo:animal-sniffer-annotations:1.18", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar", - "https://maven.google.com/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar", - "https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar" - ], - "sha256": "47f05852b48ee9baefef80fa3d8cea60efa4753c0013121dd7fe5eef2e5c729d", - "url": "https://jcenter.bintray.com/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar" - }, - { - "coord": "org.hamcrest:hamcrest-core:1.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", - "mirror_urls": [ - "https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", - "https://maven.google.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", - "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" - ], - "sha256": "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9", - "url": "https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" - } - ], - "version": "0.1.0" - } -} diff --git a/third_party/com/google/guava/BUILD b/third_party/com/google/guava/BUILD index 7d4c6e4..0b5cf33 100644 --- a/third_party/com/google/guava/BUILD +++ b/third_party/com/google/guava/BUILD @@ -1,6 +1,3 @@ -# Copyright 2018-2019 Google LLC. -# SPDX-License-Identifier: Apache-2.0 - # Google Guava # Google core libraries for Java # https://github.com/google/guava @@ -9,6 +6,6 @@ licenses(["notice"]) # Apache License 2.0 alias( name = "guava", - actual = "@maven//:com_google_guava_guava_28_1_jre", + actual = "@com_google_guava_guava_26_0_jre//jar", visibility = ["//visibility:public"], ) diff --git a/third_party/com/google/truth/BUILD b/third_party/com/google/truth/BUILD index 7076e59..781a8d5 100644 --- a/third_party/com/google/truth/BUILD +++ b/third_party/com/google/truth/BUILD @@ -1,14 +1,16 @@ -# Copyright 2018-2019 Google LLC. -# SPDX-License-Identifier: Apache-2.0 - # Google truth # Fluent assertions for Java tests # http://google.github.io/truth/ licenses(["notice"]) # Apache License 2.0 -alias( +java_library( name = "truth", - actual = "@maven//:com_google_truth_truth_1_0", visibility = ["//visibility:public"], + exports = [ + "@com_google_truth_truth//jar", + # TODO(regisd) This should be a runtime_deps + # But in that case Optional is not found + "//third_party/com/google/guava", + ], ) diff --git a/third_party/third_party_deps.bzl b/third_party/third_party_deps.bzl index 20b5fb0..ff98abc 100644 --- a/third_party/third_party_deps.bzl +++ b/third_party/third_party_deps.bzl @@ -1,8 +1,13 @@ -# Copyright 2018-2019 Google LLC. -# SPDX-License-Identifier: Apache-2.0 - # Please keep deps in alphabetical order -THIRD_PARTY_ARTIFACTS = [ - "com.google.guava:guava:28.1-jre", - "com.google.truth:truth:1.0", -] +def third_party_deps(): + + native.maven_jar( + name = "com_google_guava_guava_26_0_jre", + artifact = "com.google.guava:guava:26.0-jre", + repository = "https://jcenter.bintray.com/", + ) + native.maven_jar( + name = "com_google_truth_truth", + artifact = "com.google.truth:truth:0.42", + repository = "https://jcenter.bintray.com/", + ) From 7081ffc642e74d82e167c9136be2acec89b1a9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Tue, 19 Nov 2019 22:52:41 +0100 Subject: [PATCH 7/7] Add sha256 checksums on maven_jar deps --- jflex/deps.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jflex/deps.bzl b/jflex/deps.bzl index 3b1f628..9231b63 100644 --- a/jflex/deps.bzl +++ b/jflex/deps.bzl @@ -8,10 +8,14 @@ def jflex_deps(): name = "de_jflex_jflex_1_7_0", artifact = "de.jflex:jflex:1.7.0", repository = "https://jcenter.bintray.com/", + sha256 = "c40e64600f7d29e1618a1c1d5cd697c926ff8495e166ea9416cae19644e37ae6", + sha256_src = "3b18eb44332183ac1fbbf4573da1f2e8a373b71899a9d05a0d70308d5c5a56f3", ) native.maven_jar( name = "de_jflex_cup_runtime_11b", artifact = "de.jflex:cup_runtime:11b", repository = "https://jcenter.bintray.com/", + sha256 = "9c0b5c93fe0c0e239d5f92affb672cb7c45122c3e3de8cda9513fa8e39dbbc3c", + sha256_src = "7155a72ab7b2d6c1ecf129bcacfbe942d0b490bfe1d634532e5619a836e17591", )