-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish bazel-contrib/[email protected] (#1328)
Co-authored-by: publish-to-bcr-bot <112732530+publish-to-bcr-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
0936b53
commit 81f264c
Showing
5 changed files
with
296 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
module( | ||
name = "contrib_rules_jvm", | ||
version = "0.22.0", | ||
repo_name = "contrib_rules_jvm", | ||
) | ||
|
||
# TODO: This should be read from repositories.bzl, but we can't until this issue is solved: | ||
# - https://github.com/bazelbuild/bazel/issues/17880 | ||
PROTOBUF_VERSION = "21.7" | ||
|
||
# The java packages are published to maven under a different versioning scheme. | ||
PROTOBUF_JAVA_VERSION = "3.{}".format(PROTOBUF_VERSION) | ||
|
||
bazel_dep( | ||
name = "apple_rules_lint", | ||
version = "0.3.2", | ||
) | ||
bazel_dep( | ||
name = "bazel_skylib", | ||
version = "1.4.2", | ||
) | ||
|
||
bazel_dep( | ||
name = "bazel_skylib_gazelle_plugin", | ||
version = "1.4.2", | ||
dev_dependency = True, | ||
) | ||
|
||
bazel_dep( | ||
name = "gazelle", | ||
version = "0.34.0", | ||
repo_name = "bazel_gazelle", | ||
) | ||
bazel_dep( | ||
name = "protobuf", | ||
version = PROTOBUF_VERSION, | ||
repo_name = "com_google_protobuf", | ||
) | ||
bazel_dep( | ||
name = "rules_cc", | ||
version = "0.0.9", | ||
) | ||
bazel_dep( | ||
name = "rules_go", | ||
version = "0.43.0", | ||
repo_name = "io_bazel_rules_go", | ||
) | ||
bazel_dep( | ||
name = "rules_java", | ||
version = "6.1.1", | ||
) | ||
bazel_dep( | ||
name = "rules_jvm_external", | ||
version = "5.3", | ||
) | ||
bazel_dep( | ||
name = "rules_proto", | ||
version = "5.3.0-{}".format(PROTOBUF_VERSION), | ||
) | ||
|
||
bazel_dep( | ||
name = "stardoc", | ||
version = "0.5.6", | ||
dev_dependency = True, | ||
repo_name = "io_bazel_stardoc", | ||
) | ||
|
||
non_module_deps = use_extension("//java/private:non-module-deps.bzl", "non_module_deps") | ||
use_repo( | ||
non_module_deps, | ||
"io_grpc_grpc_java", | ||
) | ||
|
||
linter = use_extension("@apple_rules_lint//lint:extensions.bzl", "linter") | ||
linter.register(name = "java-checkstyle") | ||
linter.configure( | ||
name = "java-checkstyle", | ||
config = "//java:checkstyle-default-config", | ||
) | ||
linter.register(name = "java-pmd") | ||
linter.configure( | ||
name = "java-pmd", | ||
config = "//java:pmd-config", | ||
) | ||
linter.register(name = "java-spotbugs") | ||
linter.configure( | ||
name = "java-spotbugs", | ||
config = "//java:spotbugs-default-config", | ||
) | ||
use_repo( | ||
linter, | ||
"apple_linters", | ||
) | ||
|
||
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") | ||
|
||
IO_GRPC_GRPC_JAVA_ARTIFACTS = [ | ||
"com.google.android:annotations:4.1.1.4", | ||
"com.google.api.grpc:proto-google-common-protos:2.9.0", | ||
"com.google.auth:google-auth-library-credentials:0.22.0", | ||
"com.google.auth:google-auth-library-oauth2-http:0.22.0", | ||
"com.google.auto.value:auto-value-annotations:1.9", | ||
"com.google.auto.value:auto-value:1.9", | ||
"com.google.code.findbugs:jsr305:3.0.2", | ||
"com.google.code.gson:gson:2.9.0", | ||
"com.google.errorprone:error_prone_annotations:2.9.0", | ||
"com.google.guava:failureaccess:1.0.1", | ||
"com.google.guava:guava:31.0.1-android", | ||
"com.google.j2objc:j2objc-annotations:1.3", | ||
"com.google.re2j:re2j:1.6", | ||
"com.google.truth:truth:1.0.1", | ||
"com.squareup.okhttp:okhttp:2.7.5", | ||
"com.squareup.okio:okio:1.17.5", | ||
"io.netty:netty-buffer:4.1.87.Final", | ||
"io.netty:netty-codec-http2:4.1.87.Final", | ||
"io.netty:netty-codec-http:4.1.87.Final", | ||
"io.netty:netty-codec-socks:4.1.87.Final", | ||
"io.netty:netty-codec:4.1.87.Final", | ||
"io.netty:netty-common:4.1.87.Final", | ||
"io.netty:netty-handler-proxy:4.1.87.Final", | ||
"io.netty:netty-handler:4.1.87.Final", | ||
"io.netty:netty-resolver:4.1.87.Final", | ||
"io.netty:netty-tcnative-boringssl-static:2.0.56.Final", | ||
"io.netty:netty-tcnative-classes:2.0.56.Final", | ||
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.87.Final", | ||
"io.netty:netty-transport-native-unix-common:4.1.87.Final", | ||
"io.netty:netty-transport:4.1.87.Final", | ||
"io.opencensus:opencensus-api:0.24.0", | ||
"io.opencensus:opencensus-contrib-grpc-metrics:0.24.0", | ||
"io.perfmark:perfmark-api:0.25.0", | ||
"junit:junit:4.12", | ||
"org.apache.tomcat:annotations-api:6.0.53", | ||
"org.codehaus.mojo:animal-sniffer-annotations:1.21", | ||
] | ||
|
||
maven.install( | ||
name = "contrib_rules_jvm_deps", | ||
artifacts = [ | ||
"com.google.code.findbugs:jsr305:3.0.2", | ||
"com.google.errorprone:error_prone_annotations:2.11.0", | ||
"com.google.guava:guava:30.1.1-jre", | ||
"commons-cli:commons-cli:1.5.0", | ||
"io.grpc:grpc-api:1.40.0", | ||
"io.grpc:grpc-core:1.40.0", | ||
"io.grpc:grpc-netty:1.40.0", | ||
"io.grpc:grpc-services:1.40.0", | ||
"io.grpc:grpc-stub:1.40.0", | ||
"org.slf4j:slf4j-simple:1.7.32", | ||
"com.google.googlejavaformat:google-java-format:1.15.0", | ||
|
||
# These can be versioned independently of the versions in `repositories.bzl` | ||
# so long as the version numbers are higher. | ||
"org.junit.jupiter:junit-jupiter-engine:5.8.2", | ||
"org.junit.jupiter:junit-jupiter-api:5.8.2", | ||
"org.junit.platform:junit-platform-launcher:1.8.2", | ||
"org.junit.platform:junit-platform-reporting:1.8.2", | ||
"org.junit.vintage:junit-vintage-engine:5.8.2", | ||
|
||
# Open Test Alliance for the JVM dep | ||
"org.opentest4j:opentest4j:1.2.0", | ||
|
||
# Checkstyle deps | ||
"com.puppycrawl.tools:checkstyle:10.2", | ||
|
||
# PMD deps | ||
"net.sourceforge.pmd:pmd-dist:6.46.0", | ||
|
||
# Spotbugs deps | ||
"org.slf4j:slf4j-api:1.7.32", | ||
"org.slf4j:slf4j-jdk14:1.7.32", | ||
|
||
# We explicitly declare a protobuf runtime version | ||
# so that it coincides with the one we use to generate the code. | ||
"com.google.protobuf:protobuf-java:{}".format(PROTOBUF_JAVA_VERSION), | ||
] + IO_GRPC_GRPC_JAVA_ARTIFACTS, | ||
fail_if_repin_required = True, | ||
generate_compat_repositories = True, | ||
strict_visibility = False, | ||
) | ||
|
||
# Spotbugs deps | ||
# We don't want to force people to use 1.8-beta | ||
# but we can't use the `maven` macros because | ||
# we've not loaded rules yet. Fortunately, the | ||
# expansion is easy :) | ||
maven.artifact( | ||
name = "contrib_rules_jvm_deps", | ||
artifact = "spotbugs", | ||
exclusions = ["org.slf4j:slf4j-api"], | ||
group = "com.github.spotbugs", | ||
version = "4.7.0", | ||
) | ||
use_repo( | ||
maven, | ||
"com_google_api_grpc_proto_google_common_protos", | ||
"com_google_code_findbugs_jsr305", | ||
"com_google_errorprone_error_prone_annotations", | ||
"com_google_guava_failureaccess", | ||
"com_google_guava_guava", | ||
"com_google_j2objc_j2objc_annotations", | ||
"contrib_rules_jvm_deps", | ||
"org_apache_tomcat_annotations_api", | ||
) | ||
|
||
dev_maven = use_extension( | ||
"@rules_jvm_external//:extensions.bzl", | ||
"maven", | ||
dev_dependency = True, | ||
) | ||
dev_maven.install( | ||
name = "contrib_rules_jvm_tests", | ||
artifacts = [ | ||
# These can be versioned independently of the versions in `repositories.bzl` | ||
# so long as the version numbers are higher. | ||
"org.junit.jupiter:junit-jupiter-engine:5.8.2", | ||
"org.junit.jupiter:junit-jupiter-api:5.8.2", | ||
"org.junit.jupiter:junit-jupiter-params:5.8.2", | ||
"org.junit.platform:junit-platform-launcher:1.8.2", | ||
"org.junit.platform:junit-platform-reporting:1.8.2", | ||
"org.junit.platform:junit-platform-suite:1.8.2", | ||
"org.junit.platform:junit-platform-suite-api:1.8.2", | ||
"org.junit.platform:junit-platform-suite-engine:1.8.2", | ||
"org.junit.vintage:junit-vintage-engine:5.8.2", | ||
"org.mockito:mockito-core:4.8.1", | ||
], | ||
fail_if_repin_required = True, | ||
fetch_sources = True, | ||
) | ||
use_repo( | ||
dev_maven, | ||
"contrib_rules_jvm_tests", | ||
) | ||
|
||
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") | ||
go_sdk.download(version = "1.21.5") | ||
|
||
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") | ||
go_deps.from_file(go_mod = "//:go.mod") | ||
use_repo( | ||
go_deps, | ||
"com_github_aristanetworks_goarista", | ||
"com_github_bazelbuild_buildtools", | ||
"com_github_google_btree", | ||
"com_github_google_go_cmp", | ||
"com_github_google_uuid", | ||
"com_github_hashicorp_golang_lru", | ||
"com_github_rs_zerolog", | ||
"com_github_sergi_go_diff", | ||
"com_github_stretchr_testify", | ||
"net_starlark_go", | ||
"org_golang_google_grpc", | ||
"org_golang_x_tools", | ||
"org_golang_x_tools_go_vcs", | ||
) |
12 changes: 12 additions & 0 deletions
12
modules/contrib_rules_jvm/0.22.0/patches/module_dot_bazel_version.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
=================================================================== | ||
--- a/MODULE.bazel | ||
+++ b/MODULE.bazel | ||
@@ -1,7 +1,7 @@ | ||
module( | ||
name = "contrib_rules_jvm", | ||
- version = "0.18.0", | ||
+ version = "0.22.0", | ||
repo_name = "contrib_rules_jvm", | ||
) | ||
|
||
# TODO: This should be read from repositories.bzl, but we can't until this issue is solved: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
bcr_test_module: | ||
module_path: "" | ||
matrix: | ||
platform: ["debian10", "macos", "ubuntu2004"] | ||
tasks: | ||
gazelle: | ||
working_directory: "examples/gazelle" | ||
name: "Gazelle" | ||
platform: ${{ platform }} | ||
run_targets: | ||
- "//:gazelle" | ||
test_targets: | ||
- "//..." | ||
tests_and_lints: | ||
working_directory: "examples/tests_and_lints" | ||
name: "Tests and lints" | ||
platform: ${{ platform }} | ||
test_targets: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"integrity": "sha256-z5IQUyQLkNX3hL1GaU9M/iSHmVLrqq/X8iMsdHrTLcs=", | ||
"strip_prefix": "rules_jvm-0.22.0", | ||
"url": "https://github.com/bazel-contrib/rules_jvm/releases/download/v0.22.0/rules_jvm-v0.22.0.tar.gz", | ||
"patches": { | ||
"module_dot_bazel_version.patch": "sha256-KJTsAPf82nuwhMjWtysPhttDQGE9OAnk4Tw+yDD30s8=" | ||
}, | ||
"patch_strip": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,8 @@ | |
"versions": [ | ||
"0.13.0", | ||
"0.18.0", | ||
"0.21.4" | ||
"0.21.4", | ||
"0.22.0" | ||
], | ||
"yanked_versions": {} | ||
} |