From 912c3b4e1fa422b64aa803cab2e75e12318d8aa4 Mon Sep 17 00:00:00 2001 From: Sanjay Vasandani Date: Tue, 9 Jan 2024 14:55:22 -0800 Subject: [PATCH] Migrate to Bzlmod. This updates Bazel to 6.4.0 and Tink to 1.8.0. --- .bazelrc | 9 +- .bazelversion | 2 +- MODULE.bazel | 206 ++++++++++++++++++ WORKSPACE | 31 +-- build/bazel_skylib/repo.bzl | 31 --- build/bazel_toolchains/BUILD.bazel | 0 build/bazel_toolchains/repo.bzl | 38 ---- build/com_github_grpc_grpc/BUILD.bazel | 0 build/com_github_grpc_grpc/repo.bzl | 29 --- build/com_google_truth/BUILD.bazel | 0 build/com_google_truth/repo.bzl | 24 -- build/common_jvm_deps.bzl | 48 ---- build/common_jvm_extra_deps.bzl | 40 ---- build/common_jvm_maven.bzl | 138 ------------ build/common_jvm_repositories.bzl | 53 ----- build/defs.bzl | 12 +- .../{bazel_skylib => extensions}/BUILD.bazel | 0 build/extensions/non_module_deps.bzl | 38 ++++ build/grpc_extra_deps.bzl | 67 ------ build/grpc_java/BUILD.bazel | 0 build/grpc_java/repo.bzl | 50 ----- build/grpc_kotlin/BUILD.bazel | 0 build/grpc_kotlin/repo.bzl | 33 --- build/kotlinx_coroutines/BUILD.bazel | 0 build/kotlinx_coroutines/repo.bzl | 29 --- build/kt_jvm_proto/BUILD.bazel | 13 -- build/kt_jvm_proto/defs.bzl | 189 ++-------------- build/kt_jvm_proto/extract_srcjars.sh | 26 --- build/kt_jvm_proto_library.bzl | 32 --- build/macros.bzl | 118 +--------- build/maven/BUILD.bazel | 0 build/maven/artifacts.bzl | 32 --- build/platforms/repo.bzl | 30 --- build/protobuf/BUILD.bazel | 0 build/protobuf/repo.bzl | 22 -- build/rules_jvm_external/BUILD.bazel | 0 build/rules_jvm_external/repo.bzl | 22 -- build/rules_kotlin/defs.bzl | 28 +-- build/rules_kotlin/deps.bzl | 39 ---- build/rules_kotlin/repo.bzl | 42 ---- build/rules_kotlin/toolchain/BUILD.bazel | 19 -- build/rules_multirun/BUILD.bazel | 0 build/rules_multirun/repo.bzl | 25 --- build/rules_oci/defs.bzl | 4 +- build/rules_oci/repo.bzl | 25 --- build/rules_pkg/BUILD.bazel | 0 build/rules_pkg/repo.bzl | 27 --- build/rules_proto/BUILD.bazel | 0 build/rules_proto/repo.bzl | 43 ---- build/variables.bzl | 37 ---- build/versions.bzl | 64 +----- build/wfa/BUILD.bazel | 0 build/wfa/repositories.bzl | 31 --- .../adobe/testing/s3mock/junit4/BUILD.bazel | 2 +- .../java/com/github/luben/zstd/BUILD.bazel | 2 +- imports/java/com/google/api/core/BUILD.bazel | 2 +- imports/java/com/google/api/gax/BUILD.bazel | 2 +- .../google/api/services/bigquery/BUILD.bazel | 6 + imports/java/com/google/cloud/BUILD.bazel | 2 +- .../com/google/cloud/bigquery/BUILD.bazel | 2 +- .../java/com/google/cloud/grpc/BUILD.bazel | 2 +- .../java/com/google/cloud/spanner/BUILD.bazel | 14 +- imports/java/com/google/cloud/sql/BUILD.bazel | 2 +- .../com/google/cloud/sql/postgres/BUILD.bazel | 4 +- .../java/com/google/cloud/storage/BUILD.bazel | 2 +- .../cloud/storage/contrib/nio/BUILD.bazel | 2 +- imports/java/com/google/common/BUILD.bazel | 2 +- .../java/com/google/common/truth/BUILD.bazel | 4 +- .../common/truth/extensions/proto/BUILD.bazel | 4 +- .../java/com/google/crypto/tink/BUILD.bazel | 2 +- imports/java/com/google/gson/BUILD.bazel | 2 +- imports/java/com/google/protobuf/BUILD.bazel | 2 +- .../java/com/google/protobuf/util/BUILD.bazel | 2 +- imports/java/com/google/type/BUILD.bazel | 6 - imports/java/com/opencsv/BUILD.bazel | 2 +- imports/java/io/grpc/BUILD.bazel | 6 +- imports/java/io/grpc/inprocess/BUILD.bazel | 6 + imports/java/io/grpc/netty/BUILD.bazel | 2 +- imports/java/io/grpc/protobuf/BUILD.bazel | 2 +- .../io/grpc/protobuf/services/BUILD.bazel | 2 +- imports/java/io/grpc/stub/BUILD.bazel | 2 +- imports/java/io/grpc/testing/BUILD.bazel | 2 +- imports/java/io/netty/handler/BUILD.bazel | 2 +- imports/java/io/opentelemetry/api/BUILD.bazel | 2 +- .../java/io/opentelemetry/context/BUILD.bazel | 2 +- imports/java/io/projectreactor/BUILD.bazel | 2 +- imports/java/io/r2dbc/BUILD.bazel | 2 +- imports/java/liquibase/BUILD.bazel | 2 +- imports/java/liquibase/ext/BUILD.bazel | 2 +- .../java/liquibase/ext/spanner/BUILD.bazel | 2 +- imports/java/org/apache/commons/BUILD.bazel | 4 +- .../apache/commons/numbers/gamma/BUILD.bazel | 2 +- imports/java/org/brotli/dec/BUILD.bazel | 2 +- imports/java/org/conscrypt/BUILD.bazel | 2 +- .../org/jetbrains/annotations/BUILD.bazel | 2 +- imports/java/org/junit/BUILD.bazel | 2 +- imports/java/org/mockito/BUILD.bazel | 2 +- imports/java/org/postgresql/BUILD.bazel | 4 +- imports/java/org/reactivestreams/BUILD.bazel | 2 +- .../org/testcontainers/containers/BUILD.bazel | 2 +- imports/java/org/yaml/BUILD.bazel | 2 +- imports/java/picocli/BUILD.bazel | 2 +- .../software/amazon/awssdk/auth/BUILD.bazel | 6 + .../awssdk/services/regions/BUILD.bazel | 2 +- .../amazon/awssdk/services/s3/BUILD.bazel | 2 +- .../services/secretsmanager/BUILD.bazel | 2 +- .../amazon/awssdk/services/sts/BUILD.bazel | 2 +- .../com/google/protobuf/kotlin/BUILD.bazel | 2 +- imports/kotlin/com/google/type/BUILD.bazel | 23 ++ imports/kotlin/io/grpc/health/v1/BUILD.bazel | 12 +- imports/kotlin/io/grpc/kotlin/BUILD.bazel | 2 +- imports/kotlin/kotlin/BUILD.bazel | 2 +- imports/kotlin/kotlin/reflect/BUILD.bazel | 2 +- imports/kotlin/kotlin/test/BUILD.bazel | 2 +- imports/kotlin/kotlinx/coroutines/BUILD.bazel | 14 +- .../kotlinx/coroutines/debug/BUILD.bazel | 2 +- .../kotlinx/coroutines/guava/BUILD.bazel | 2 +- .../kotlinx/coroutines/reactive/BUILD.bazel | 2 +- .../kotlinx/coroutines/test/BUILD.bazel | 2 +- imports/kotlin/org/mockito/kotlin/BUILD.bazel | 2 +- .../wfanet/measurement/aws/common/BUILD.bazel | 2 +- .../measurement/aws/postgres/BUILD.bazel | 3 +- .../aws/postgres/tools/BUILD.bazel | 2 +- .../org/wfanet/measurement/aws/s3/BUILD.bazel | 3 +- .../org/wfanet/measurement/common/BUILD.bazel | 6 +- .../org/wfanet/measurement/common/Runfiles.kt | 18 +- .../measurement/common/crypto/BUILD.bazel | 2 +- .../common/crypto/testing/BUILD.bazel | 2 +- .../common/crypto/tink/BUILD.bazel | 2 +- .../common/crypto/tink/testing/BUILD.bazel | 2 +- .../common/db/liquibase/BUILD.bazel | 2 +- .../common/db/liquibase/tools/BUILD.bazel | 2 +- .../common/db/postgres/BUILD.bazel | 2 +- .../common/db/postgres/tools/BUILD.bazel | 2 +- .../measurement/common/db/r2dbc/BUILD.bazel | 2 +- .../common/db/r2dbc/postgres/BUILD.bazel | 2 +- .../db/r2dbc/postgres/testing/BUILD.bazel | 2 +- .../measurement/common/graphviz/BUILD.bazel | 2 +- .../measurement/common/grpc/BUILD.bazel | 2 +- .../common/grpc/testing/BUILD.bazel | 3 +- .../measurement/common/identity/BUILD.bazel | 2 +- .../common/identity/testing/BUILD.bazel | 2 +- .../measurement/common/openid/BUILD.bazel | 2 +- .../measurement/common/riegeli/BUILD.bazel | 2 +- .../measurement/common/testing/BUILD.bazel | 3 +- .../measurement/common/throttler/BUILD.bazel | 3 +- .../common/throttler/testing/BUILD.bazel | 2 +- .../measurement/gcloud/common/BUILD.bazel | 4 +- .../wfanet/measurement/gcloud/gcs/BUILD.bazel | 2 +- .../measurement/gcloud/logging/BUILD.bazel | 2 +- .../measurement/gcloud/postgres/BUILD.bazel | 2 +- .../gcloud/postgres/tools/BUILD.bazel | 2 +- .../measurement/gcloud/spanner/BUILD.bazel | 3 +- .../gcloud/spanner/testing/BUILD.bazel | 2 +- .../gcloud/spanner/testing/macros.bzl | 2 +- .../gcloud/spanner/tools/BUILD.bazel | 2 +- .../wfanet/measurement/storage/BUILD.bazel | 2 +- .../storage/filesystem/BUILD.bazel | 2 +- .../measurement/storage/forwarded/BUILD.bazel | 2 +- .../measurement/storage/testing/BUILD.bazel | 2 +- src/main/proto/google/type/BUILD.bazel | 27 --- .../measurement/common/testing/BUILD.bazel | 16 +- .../measurement/internal/testing/BUILD.bazel | 5 +- .../measurement/testing/riegeli/BUILD.bazel | 6 +- src/test/kotlin/org/wfanet/bazel/BUILD.bazel | 2 +- .../org/wfanet/measurement/aws/s3/BUILD.bazel | 3 +- .../org/wfanet/measurement/common/BUILD.bazel | 4 +- .../measurement/common/crypto/BUILD.bazel | 2 +- .../common/crypto/tink/BUILD.bazel | 2 +- .../common/crypto/tink/testing/BUILD.bazel | 2 +- .../common/db/r2dbc/postgres/BUILD.bazel | 6 +- .../measurement/common/graphviz/BUILD.bazel | 2 +- .../measurement/common/grpc/BUILD.bazel | 4 +- .../measurement/common/identity/BUILD.bazel | 2 +- .../measurement/common/riegeli/BUILD.bazel | 2 +- .../measurement/common/testing/BUILD.bazel | 2 +- .../measurement/common/throttler/BUILD.bazel | 3 +- .../wfanet/measurement/gcloud/gcs/BUILD.bazel | 2 +- .../measurement/gcloud/logging/BUILD.bazel | 2 +- .../measurement/gcloud/spanner/BUILD.bazel | 2 +- .../storage/filesystem/BUILD.bazel | 2 +- .../measurement/storage/testing/BUILD.bazel | 2 +- .../proto/wfa/measurement/common/BUILD.bazel | 12 +- 183 files changed, 524 insertions(+), 1661 deletions(-) create mode 100644 MODULE.bazel delete mode 100644 build/bazel_skylib/repo.bzl delete mode 100644 build/bazel_toolchains/BUILD.bazel delete mode 100644 build/bazel_toolchains/repo.bzl delete mode 100644 build/com_github_grpc_grpc/BUILD.bazel delete mode 100644 build/com_github_grpc_grpc/repo.bzl delete mode 100644 build/com_google_truth/BUILD.bazel delete mode 100644 build/com_google_truth/repo.bzl delete mode 100644 build/common_jvm_deps.bzl delete mode 100644 build/common_jvm_extra_deps.bzl delete mode 100644 build/common_jvm_maven.bzl delete mode 100644 build/common_jvm_repositories.bzl rename build/{bazel_skylib => extensions}/BUILD.bazel (100%) create mode 100644 build/extensions/non_module_deps.bzl delete mode 100644 build/grpc_extra_deps.bzl delete mode 100644 build/grpc_java/BUILD.bazel delete mode 100644 build/grpc_java/repo.bzl delete mode 100644 build/grpc_kotlin/BUILD.bazel delete mode 100644 build/grpc_kotlin/repo.bzl delete mode 100644 build/kotlinx_coroutines/BUILD.bazel delete mode 100644 build/kotlinx_coroutines/repo.bzl delete mode 100755 build/kt_jvm_proto/extract_srcjars.sh delete mode 100644 build/kt_jvm_proto_library.bzl delete mode 100644 build/maven/BUILD.bazel delete mode 100644 build/maven/artifacts.bzl delete mode 100644 build/platforms/repo.bzl delete mode 100644 build/protobuf/BUILD.bazel delete mode 100644 build/protobuf/repo.bzl delete mode 100644 build/rules_jvm_external/BUILD.bazel delete mode 100644 build/rules_jvm_external/repo.bzl delete mode 100644 build/rules_kotlin/deps.bzl delete mode 100644 build/rules_kotlin/repo.bzl delete mode 100644 build/rules_kotlin/toolchain/BUILD.bazel delete mode 100644 build/rules_multirun/BUILD.bazel delete mode 100644 build/rules_multirun/repo.bzl delete mode 100644 build/rules_oci/repo.bzl delete mode 100644 build/rules_pkg/BUILD.bazel delete mode 100644 build/rules_pkg/repo.bzl delete mode 100644 build/rules_proto/BUILD.bazel delete mode 100644 build/rules_proto/repo.bzl delete mode 100644 build/variables.bzl delete mode 100644 build/wfa/BUILD.bazel delete mode 100644 build/wfa/repositories.bzl create mode 100644 imports/java/com/google/api/services/bigquery/BUILD.bazel delete mode 100644 imports/java/com/google/type/BUILD.bazel create mode 100644 imports/java/io/grpc/inprocess/BUILD.bazel create mode 100644 imports/java/software/amazon/awssdk/auth/BUILD.bazel create mode 100644 imports/kotlin/com/google/type/BUILD.bazel delete mode 100644 src/main/proto/google/type/BUILD.bazel diff --git a/.bazelrc b/.bazelrc index a8faf8d15..11c97abc6 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +1,8 @@ +# Enable Bzlmod. +common --enable_bzlmod +common --registry=https://raw.githubusercontent.com/world-federation-of-advertisers/bazel-registry/main +common --registry=https://bcr.bazel.build + # Use clang as C++ compiler. build --repo_env='CC=clang' @@ -7,5 +12,5 @@ build --cxxopt='-std=c++17' # Use JDK 11. See https://github.com/bazelbuild/bazel/issues/6245. build --java_runtime_version=remotejdk_11 -# Target Java 8. -build --java_language_version=8 \ No newline at end of file +# Target Java 9. +build --java_language_version=9 diff --git a/.bazelversion b/.bazelversion index 8a30e8f94..19b860c18 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -5.4.0 +6.4.0 diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 000000000..c3d0644e5 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,206 @@ +module( + name = "common-jvm", + repo_name = "wfa_common_jvm", +) + +KOTLINX_COROUTINES_VERSION = "1.7.3" + +PROTOBUF_JAVA_VERSION = "3.25.1" + +GRPC_JAVA_VERSION = "1.59.1" + +AWS_JAVA_SDK_VERSION = "2.17.258" + +OPENTELEMETRY_JAVA_VERSION = "1.32.0" + +TRUTH_VERSION = "1.1.2" + +TINK_VERSION = "1.12.0" + +MAVEN_REPO_NAME = "common_jvm_maven" + +# Bazel Central Registry deps. +bazel_dep( + name = "platforms", + version = "0.0.8", +) +bazel_dep( + name = "bazel_skylib", + version = "1.5.0", +) +bazel_dep( + name = "rules_proto", + version = "5.3.0-21.7", +) +bazel_dep( + name = "rules_pkg", + version = "0.9.1", +) +bazel_dep( + name = "rules_java", + version = "7.2.0", +) +bazel_dep( + name = "rules_multirun", + version = "0.6.1", +) +bazel_dep( + name = "protobuf", + version = "21.7", + repo_name = "com_google_protobuf", +) +bazel_dep( + name = "rules_jvm_external", + version = "5.3", +) +bazel_dep( + name = "rules_oci", + version = "1.4.3", +) + +# WFA registry deps. +bazel_dep( + name = "rules_kotlin_jvm", + version = "0.1.1", + repo_name = "wfa_rules_kotlin_jvm", +) +bazel_dep( + name = "googleapis", + version = "0.0.0-bzlmod.1", + repo_name = "com_google_googleapis", +) + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") + +# Work around "circular dependency" between grpc-core and grpc-util. +# TODO(bazelbuild/rules_jvm_external#966): Remove when fixed. +maven.artifact( + name = MAVEN_REPO_NAME, + artifact = "grpc-core", + exclusions = ["io.grpc:grpc-util"], + group = "io.grpc", + version = GRPC_JAVA_VERSION, +) +maven.install( + name = MAVEN_REPO_NAME, + artifacts = [ + "junit:junit:4.13.2", + "org.conscrypt:conscrypt-openjdk-uber:2.5.2", + "org.jetbrains:annotations:23.0.0", + "org.mockito:mockito-core:4.11.0", + "org.mockito.kotlin:mockito-kotlin:4.1.0", + "info.picocli:picocli:4.4.0", + "com.google.api:api-common:2.21.0", + "com.google.api:gax:2.38.0", + "com.google.apis:google-api-services-bigquery:v2-rev20231111-2.0.0", + "com.google.cloud:google-cloud-core:2.28.0", + "com.google.cloud:google-cloud-core-grpc:2.28.0", + "com.google.cloud:google-cloud-storage:2.30.1", + "com.google.cloud:google-cloud-nio:0.127.8", + "com.google.cloud:google-cloud-spanner:6.55.0", + "com.google.cloud:google-cloud-bigquery:2.35.0", + "com.google.code.gson:gson:2.10.1", + "com.google.protobuf:protobuf-java:" + PROTOBUF_JAVA_VERSION, + "com.google.protobuf:protobuf-java-util:" + PROTOBUF_JAVA_VERSION, + "io.grpc:grpc-context:" + GRPC_JAVA_VERSION, + "io.grpc:grpc-testing:" + GRPC_JAVA_VERSION, + "io.grpc:grpc-netty:" + GRPC_JAVA_VERSION, + "io.grpc:grpc-services:" + GRPC_JAVA_VERSION, + "io.grpc:grpc-inprocess:" + GRPC_JAVA_VERSION, + "io.netty:netty-handler:4.1.79.Final", + "org.jetbrains.kotlinx:kotlinx-coroutines-test:" + KOTLINX_COROUTINES_VERSION, + "org.jetbrains.kotlinx:kotlinx-coroutines-debug:" + KOTLINX_COROUTINES_VERSION, + "org.jetbrains.kotlinx:kotlinx-coroutines-reactive:" + KOTLINX_COROUTINES_VERSION, + "org.jetbrains.kotlinx:kotlinx-coroutines-guava:" + KOTLINX_COROUTINES_VERSION, + "org.reactivestreams:reactive-streams:1.0.4", + "io.projectreactor:reactor-core:3.4.19", + "com.google.crypto.tink:tink:" + TINK_VERSION, + + # Truth. + "com.google.truth:truth:" + TRUTH_VERSION, + "com.google.truth.extensions:truth-java8-extension:" + TRUTH_VERSION, + "com.google.truth.extensions:truth-proto-extension:" + TRUTH_VERSION, + "com.google.truth.extensions:truth-liteproto-extension:" + TRUTH_VERSION, + + # AWS. + "com.adobe.testing:s3mock-junit4:2.2.3", + "software.amazon.awssdk:auth:" + AWS_JAVA_SDK_VERSION, + "software.amazon.awssdk:regions:" + AWS_JAVA_SDK_VERSION, + "software.amazon.awssdk:s3:" + AWS_JAVA_SDK_VERSION, + "software.amazon.awssdk:secretsmanager:" + AWS_JAVA_SDK_VERSION, + "software.amazon.awssdk:sts:" + AWS_JAVA_SDK_VERSION, + + # OpenTelemetry. + "io.opentelemetry:opentelemetry-api:" + OPENTELEMETRY_JAVA_VERSION, + "io.opentelemetry:opentelemetry-context:" + OPENTELEMETRY_JAVA_VERSION, + + # PostgreSQL. + "com.google.cloud.sql:postgres-socket-factory:1.6.2", + "com.google.cloud.sql:cloud-sql-connector-r2dbc-core:1.6.2", + "com.google.cloud.sql:cloud-sql-connector-r2dbc-postgres:1.6.2", + "org.postgresql:postgresql:42.4.0", + "org.testcontainers:postgresql:1.18.3", + "org.postgresql:r2dbc-postgresql:0.9.1.RELEASE", + "io.r2dbc:r2dbc-spi:0.9.1.RELEASE", + + # Liquibase. + "org.yaml:snakeyaml:1.30", + "org.liquibase:liquibase-core:4.18.0", + "com.google.cloudspannerecosystem:liquibase-spanner:4.17.0", + "com.google.cloud:google-cloud-spanner-jdbc:2.9.0", + "org.liquibase.ext:liquibase-postgresql:4.11.0", + + # Math library. + "org.apache.commons:commons-math3:3.6.1", + "org.apache.commons:commons-numbers-gamma:1.1", + + # CSV library. + "com.opencsv:opencsv:5.6", + + # Riegeli Decompressor + "org.apache.commons:commons-compress:1.22", + "org.brotli:dec:0.1.2", + "com.github.luben:zstd-jni:1.5.2-5", + ], + exclusions = [ + # protobuf-java and protobuf-javalite cannot coexist. + "com.google.protobuf:protobuf-javalite", + ], + fetch_sources = True, + repositories = [ + "https://maven.google.com", + "https://repo1.maven.org/maven2", + ], + strict_visibility = True, +) +use_repo(maven, MAVEN_REPO_NAME) + +oci = use_extension("@rules_oci//oci:extensions.bzl", "oci") +oci.pull( + name = "java_image_base", + # Digest of nonroot-amd64 tag. + digest = "sha256:781e3acb7934ce0fa5ceeb62ee1369248ab23ae26dce002138b3d0e5338d7486", + image = "gcr.io/distroless/java11-debian11", +) +oci.pull( + name = "java_debug_image_base", + # Digest of debug-nonroot-amd64 tag. + digest = "sha256:95749ff107e1a1e14a62709f305208973530764cdac02a0f7762295dba2c40d2", + image = "gcr.io/distroless/java11-debian11", +) +use_repo( + oci, + "java_debug_image_base", + "java_image_base", +) + +non_module_deps = use_extension( + "//build/extensions:non_module_deps.bzl", + "non_module_deps", +) +use_repo( + non_module_deps, + "cloud_spanner_emulator", + "com_google_highwayhash", + "io_grpc_grpc_proto", +) diff --git a/WORKSPACE b/WORKSPACE index aa1fb5b7c..c21e24531 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,30 +1,3 @@ +# This file marks the root of the Bazel workspace. +# See MODULE.bazel for external dependencies setup. workspace(name = "wfa_common_jvm") - -load("//build:common_jvm_repositories.bzl", "common_jvm_repositories") - -common_jvm_repositories() - -load("//build:common_jvm_deps.bzl", "common_jvm_deps") - -common_jvm_deps() - -load( - "//build:common_jvm_maven.bzl", - "COMMON_JVM_EXCLUDED_ARTIFACTS", - "COMMON_JVM_MAVEN_OVERRIDE_TARGETS", - "common_jvm_maven_artifacts", -) -load("@rules_jvm_external//:defs.bzl", "maven_install") - -maven_install( - artifacts = common_jvm_maven_artifacts(), - excluded_artifacts = COMMON_JVM_EXCLUDED_ARTIFACTS, - fetch_sources = True, - generate_compat_repositories = True, - override_targets = COMMON_JVM_MAVEN_OVERRIDE_TARGETS, - repositories = ["https://repo.maven.apache.org/maven2/"], -) - -load("//build:common_jvm_extra_deps.bzl", "common_jvm_extra_deps") - -common_jvm_extra_deps() diff --git a/build/bazel_skylib/repo.bzl b/build/bazel_skylib/repo.bzl deleted file mode 100644 index 401a1ca8c..000000000 --- a/build/bazel_skylib/repo.bzl +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Repository rules/macros for Bazel Skylib. -""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -def bazel_skylib(): - maybe( - http_archive, - name = "bazel_skylib", - sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", - ], - ) diff --git a/build/bazel_toolchains/BUILD.bazel b/build/bazel_toolchains/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/bazel_toolchains/repo.bzl b/build/bazel_toolchains/repo.bzl deleted file mode 100644 index 79cfab7a8..000000000 --- a/build/bazel_toolchains/repo.bzl +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2020 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository macros for bazel-toolchains library. - -See https://github.com/bazelbuild/bazel-toolchains -""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -_URL_TEMPLATES = [ - "https://github.com/bazelbuild/bazel-toolchains/releases/download/{version}/bazel-toolchains-{version}.tar.gz", - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/{version}/bazel-toolchains-{version}.tar.gz", -] - -def bazel_toolchains(name, version, sha256): - prefix = "bazel-toolchains-" + version - urls = [template.format(version = version) for template in _URL_TEMPLATES] - - maybe( - http_archive, - name = name, - sha256 = sha256, - strip_prefix = prefix, - urls = urls, - ) diff --git a/build/com_github_grpc_grpc/BUILD.bazel b/build/com_github_grpc_grpc/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/com_github_grpc_grpc/repo.bzl b/build/com_github_grpc_grpc/repo.bzl deleted file mode 100644 index 3459f09dd..000000000 --- a/build/com_github_grpc_grpc/repo.bzl +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Repository rules/macros for Github GRPC. -""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -def com_github_grpc_grpc(): - maybe( - http_archive, - name = "com_github_grpc_grpc", - sha256 = "67423a4cd706ce16a88d1549297023f0f9f0d695a96dd684adc21e67b021f9bc", - strip_prefix = "grpc-1.46.0", - urls = ["https://github.com/grpc/grpc/archive/v1.46.0.tar.gz"], - ) diff --git a/build/com_google_truth/BUILD.bazel b/build/com_google_truth/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/com_google_truth/repo.bzl b/build/com_google_truth/repo.bzl deleted file mode 100644 index bdf57b453..000000000 --- a/build/com_google_truth/repo.bzl +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2020 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository defs for Truth library.""" - -_ARTIFACT_NAMES = [ - "com.google.truth.extensions:truth-java8-extension", - "com.google.truth.extensions:truth-proto-extension", - "com.google.truth:truth", -] - -def com_google_truth_artifact_dict(version): - return {name: version for name in _ARTIFACT_NAMES} diff --git a/build/common_jvm_deps.bzl b/build/common_jvm_deps.bzl deleted file mode 100644 index af5e3001f..000000000 --- a/build/common_jvm_deps.bzl +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Adds external repos necessary for common-jvm. -""" - -load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") -load( - "@com_google_googleapis//:repository_rules.bzl", - "switched_rules_by_language", -) -load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps") -load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies") -load("@rules_pkg//pkg:deps.bzl", "rules_pkg_dependencies", "rules_pkg_register_toolchains") -load( - "@rules_proto//proto:repositories.bzl", - "rules_proto_dependencies", - "rules_proto_toolchains", -) -load("//build/rules_kotlin:deps.bzl", "rules_kotlin_deps") - -# buildifier: disable=unnamed-macro -def common_jvm_deps(): - """Adds transitive dependencies of external repos for common-jvm.""" - rules_pkg_dependencies() - rules_pkg_register_toolchains() - rules_proto_dependencies() - rules_proto_toolchains() - rules_jvm_external_deps() - grpc_deps() - rules_kotlin_deps() - rules_oci_dependencies() - switched_rules_by_language( - name = "com_google_googleapis_imports", - java = True, - ) diff --git a/build/common_jvm_extra_deps.bzl b/build/common_jvm_extra_deps.bzl deleted file mode 100644 index 5dab9a54a..000000000 --- a/build/common_jvm_extra_deps.bzl +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Adds external repos necessary for common-jvm. -""" - -load("@com_github_grpc_grpc_kotlin//:repositories.bzl", "grpc_kt_repositories") -load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories") -load("@maven//:compat.bzl", "compat_repositories") -load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup") -load("@rules_oci//oci:repositories.bzl", "LATEST_CRANE_VERSION", "oci_register_toolchains") -load("//build:grpc_extra_deps.bzl", "grpc_extra_deps") -load("//build/rules_oci:base_images.bzl", "base_java_images") - -def common_jvm_extra_deps(): - """ - Adds second-level transitive dependencies of external repos for common-jvm. - """ - rules_jvm_external_setup() - grpc_extra_deps() - compat_repositories() - oci_register_toolchains( - name = "oci", - crane_version = LATEST_CRANE_VERSION, - ) - base_java_images() - grpc_kt_repositories() - grpc_java_repositories() diff --git a/build/common_jvm_maven.bzl b/build/common_jvm_maven.bzl deleted file mode 100644 index 9f5ed75ed..000000000 --- a/build/common_jvm_maven.bzl +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Adds external repos necessary for common-jvm. -""" - -load( - "@com_github_grpc_grpc_kotlin//:repositories.bzl", - GRPC_KOTLIN_MAVEN_DEPS = "IO_GRPC_GRPC_KOTLIN_ARTIFACTS", -) -load( - "@io_grpc_grpc_java//:repositories.bzl", - GRPC_JAVA_MAVEN_DEPS = "IO_GRPC_GRPC_JAVA_ARTIFACTS", -) -load( - "//build:versions.bzl", - "AWS_JAVA_SDK_VERSION", - "OPENTELEMETRY_JAVA_VERSION", - "PROTOBUF_KOTLIN_VERSION", -) -load("//build/com_google_truth:repo.bzl", "com_google_truth_artifact_dict") -load("//build/grpc_java:repo.bzl", "grpc_java_maven_artifacts_dict") -load( - "//build/grpc_kotlin:repo.bzl", - "GRPC_KOTLIN_OVERRIDE_TARGETS", - "grpc_kotlin_maven_artifacts_dict", -) -load("//build/kotlinx_coroutines:repo.bzl", "kotlinx_coroutines_artifact_dict") -load("//build/maven:artifacts.bzl", "artifacts") -load( - "//build/rules_kotlin:repo.bzl", - "rules_kotlin_maven_artifacts_dict", -) -load( - "//build/rules_proto:repo.bzl", - "rules_proto_maven_artifacts_dict", - RULES_PROTO_EXCLUDED_ARTIFACTS = "EXCLUDED_ARTIFACTS", -) - -# buildifier: disable=function-docstring-return -def common_jvm_maven_artifacts(): - """Returns a list of Maven artifacts for this repo.""" - return artifacts.dict_to_list(common_jvm_maven_artifacts_dict()) - -# buildifier: disable=function-docstring-return -def common_jvm_maven_artifacts_dict(): - """Returns a dict of Maven coordinates to version for this repo.""" - maven_artifacts = artifacts.list_to_dict( - GRPC_JAVA_MAVEN_DEPS + - GRPC_KOTLIN_MAVEN_DEPS, - ) - - maven_artifacts.update(rules_proto_maven_artifacts_dict()) - maven_artifacts.update(rules_kotlin_maven_artifacts_dict()) - maven_artifacts.update(grpc_java_maven_artifacts_dict()) - maven_artifacts.update(grpc_kotlin_maven_artifacts_dict()) - maven_artifacts.update(com_google_truth_artifact_dict(version = "1.0.1")) - maven_artifacts.update(kotlinx_coroutines_artifact_dict()) - - # Add Maven artifacts or override versions (e.g. those pulled in by gRPC Kotlin - # or default dependency versions). - maven_artifacts.update({ - "com.adobe.testing:s3mock-junit4": "2.2.3", - "com.google.cloud:google-cloud-bigquery": "2.10.10", - "com.google.cloud:google-cloud-nio": "0.123.28", - "com.google.cloud:google-cloud-spanner": "6.35.2", - "com.google.cloud:google-cloud-storage": "2.6.1", - "com.google.guava:guava": "31.0.1-jre", - "com.google.crypto.tink:tink": "1.12.0", - "info.picocli:picocli": "4.4.0", - "io.opentelemetry:opentelemetry-api": OPENTELEMETRY_JAVA_VERSION, - "junit:junit": "4.13", - "org.conscrypt:conscrypt-openjdk-uber": "2.5.2", - "org.jetbrains:annotations": "23.0.0", - "org.mockito.kotlin:mockito-kotlin": "3.2.0", - "software.amazon.awssdk:s3": AWS_JAVA_SDK_VERSION, - "software.amazon.awssdk:secretsmanager": AWS_JAVA_SDK_VERSION, - "software.amazon.awssdk:sts": AWS_JAVA_SDK_VERSION, - "software.amazon.awssdk:regions": AWS_JAVA_SDK_VERSION, - - # PostgreSQL. - "com.google.cloud.sql:postgres-socket-factory": "1.6.2", - "com.google.cloud.sql:cloud-sql-connector-r2dbc-postgres": "1.6.2", - "org.postgresql:postgresql": "42.4.0", - "org.postgresql:r2dbc-postgresql": "0.9.1.RELEASE", - "org.testcontainers:postgresql": "1.18.3", - - # Liquibase. - "org.yaml:snakeyaml": "1.30", - "org.liquibase:liquibase-core": "4.18.0", - "com.google.cloudspannerecosystem:liquibase-spanner": "4.17.0", - "com.google.cloud:google-cloud-spanner-jdbc": "2.9.0", - "org.liquibase.ext:liquibase-postgresql": "4.11.0", - - # For grpc-kotlin. This should be a version that is compatible with - # KOTLIN_RELEASE_VERSION. - "com.squareup:kotlinpoet": "1.8.0", - - # For kt_jvm_proto_library. - "com.google.protobuf:protobuf-kotlin": PROTOBUF_KOTLIN_VERSION, - - # Math library. - "org.apache.commons:commons-math3": "3.6.1", - "org.apache.commons:commons-numbers-gamma": "1.1", - - # CSV library. - "com.opencsv:opencsv": "5.6", - - # Riegeli Decompressor - "org.apache.commons:commons-compress": "1.22", - "org.brotli:dec": "0.1.2", - "com.github.luben:zstd-jni": "1.5.2-5", - }) - - return maven_artifacts - -COMMON_JVM_MAVEN_OVERRIDE_TARGETS = GRPC_KOTLIN_OVERRIDE_TARGETS - -COMMON_JVM_EXCLUDED_ARTIFACTS = [ - # Until the log2shell has been more widely mitigated, prohibit log4j totally. - "org.apache.logging.log4j:log4j", - "org.apache.logging.log4j:log4j-api", - "org.apache.logging.log4j:log4j-core", - "org.slf4j:log4j-over-slf4j", - "org.slf4j:slf4j-log4j12", -] + RULES_PROTO_EXCLUDED_ARTIFACTS diff --git a/build/common_jvm_repositories.bzl b/build/common_jvm_repositories.bzl deleted file mode 100644 index b809a3ce0..000000000 --- a/build/common_jvm_repositories.bzl +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Adds external repos necessary for common-jvm. -""" - -load("//build/bazel_skylib:repo.bzl", "bazel_skylib") -load("//build/cloud_spanner_emulator:defs.bzl", "cloud_spanner_emulator_binaries") -load("//build/com_github_grpc_grpc:repo.bzl", "com_github_grpc_grpc") -load("//build/com_google_googleapis:repo.bzl", "com_google_googleapis") -load("//build/com_google_highwayhash:repo.bzl", "com_google_highwayhash") -load("//build/grpc_java:repo.bzl", "io_grpc_grpc_java") -load("//build/grpc_kotlin:repo.bzl", "com_github_grpc_grpc_kotlin") -load("//build/platforms:repo.bzl", "platforms_repo") -load("//build/protobuf:repo.bzl", "com_github_protocolbuffers_protobuf") -load("//build/rules_jvm_external:repo.bzl", "rules_jvm_external_repo") -load("//build/rules_kotlin:repo.bzl", "io_bazel_rules_kotlin") -load("//build/rules_multirun:repo.bzl", "rules_multirun") -load("//build/rules_oci:repo.bzl", "rules_oci") -load("//build/rules_pkg:repo.bzl", "rules_pkg") -load("//build/rules_proto:repo.bzl", "rules_proto") - -def common_jvm_repositories(): - """ - Adds all external repos necessary for common-jvm. - """ - platforms_repo() - bazel_skylib() - rules_pkg() - com_github_protocolbuffers_protobuf() - rules_proto() - rules_jvm_external_repo() - io_bazel_rules_kotlin() - io_grpc_grpc_java() - com_github_grpc_grpc_kotlin() - com_github_grpc_grpc() - cloud_spanner_emulator_binaries() - rules_oci() - rules_multirun() - com_google_googleapis() - com_google_highwayhash() diff --git a/build/defs.bzl b/build/defs.bzl index 1ca281f82..702860fd1 100644 --- a/build/defs.bzl +++ b/build/defs.bzl @@ -14,21 +14,17 @@ """Utility functions definitions.""" +# buildifier: disable=unnamed-macro def to_label(label_string): """Returns a Label object for a possibly relative label string.""" - if label_string.startswith("@") or label_string.startswith("//"): - return Label(label_string) - - return Label("{repo}//{package}".format( - repo = native.repository_name(), - package = native.package_name(), - )).relative(label_string) + return native.package_relative_label(label_string) +# buildifier: disable=unnamed-macro def test_target(target): """Returns the label for the corresponding target in the test tree.""" label = to_label(target) test_package = label.package.replace("src/main/", "src/test/", 1) - return Label("@{workspace}//{package}:{target_name}".format( + return Label("@@{workspace}//{package}:{target_name}".format( workspace = label.workspace_name, package = test_package, target_name = label.name, diff --git a/build/bazel_skylib/BUILD.bazel b/build/extensions/BUILD.bazel similarity index 100% rename from build/bazel_skylib/BUILD.bazel rename to build/extensions/BUILD.bazel diff --git a/build/extensions/non_module_deps.bzl b/build/extensions/non_module_deps.bzl new file mode 100644 index 000000000..98201cd94 --- /dev/null +++ b/build/extensions/non_module_deps.bzl @@ -0,0 +1,38 @@ +# Copyright 2023 The Cross-Media Measurement Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Module extension for non-module dependencies of common_jvm.""" + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("//build/cloud_spanner_emulator:defs.bzl", "cloud_spanner_emulator_binaries") +load("//build/com_google_googleapis:repo.bzl", "com_google_googleapis") +load("//build/com_google_highwayhash:repo.bzl", "com_google_highwayhash") + +def _non_module_deps_impl( + # buildifier: disable=unused-variable + mctx): + com_google_googleapis() + cloud_spanner_emulator_binaries() + com_google_highwayhash() + + http_archive( + name = "io_grpc_grpc_proto", + sha256 = "464e97a24d7d784d9c94c25fa537ba24127af5aae3edd381007b5b98705a0518", + strip_prefix = "grpc-proto-08911e9d585cbda3a55eb1dcc4b99c89aebccff8", + urls = ["https://github.com/grpc/grpc-proto/archive/08911e9d585cbda3a55eb1dcc4b99c89aebccff8.zip"], + ) + +non_module_deps = module_extension( + implementation = _non_module_deps_impl, +) diff --git a/build/grpc_extra_deps.bzl b/build/grpc_extra_deps.bzl deleted file mode 100644 index 427714856..000000000 --- a/build/grpc_extra_deps.bzl +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2023 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Loads the dependencies necessary for the external repositories defined in grpc_deps.bzl. -""" - -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") -load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") -load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies") -load("@com_envoyproxy_protoc_gen_validate//:dependencies.bzl", "go_third_party") -load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language") -load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") -load("@envoy_api//bazel:repositories.bzl", "api_dependencies") -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") -load("@upb//bazel:workspace_deps.bzl", "upb_deps") - -def grpc_extra_deps(ignore_version_differences = False, go_toolchains_version = "1.19.4"): - """Loads additional gRPC dependencies. - - This is copied from https://github.com/grpc/grpc - with modifications to address version compatibility issues. - It must be run after `grpc_deps`. - - TODO(grpc/grpc#32850): Revert when the dependency issue is addressed. - - Args: - ignore_version_differences: Plumbed directly to the invocation of - apple_rules_dependencies. - go_toolchains_version: Plumbed directly to the invocation of - go_register_toolchains. - """ - protobuf_deps() - - upb_deps() - - api_dependencies() - - go_rules_dependencies() - go_register_toolchains(version = go_toolchains_version) - gazelle_dependencies() - - # Pull-in the go 3rd party dependencies for protoc_gen_validate, which is - # needed for building C++ xDS protos - go_third_party() - - apple_rules_dependencies(ignore_version_differences = ignore_version_differences) - - apple_support_dependencies() - - # Initialize Google APIs with only C++ and Python targets - switched_rules_by_language( - name = "com_google_googleapis_imports", - cc = True, - grpc = True, - python = True, - ) diff --git a/build/grpc_java/BUILD.bazel b/build/grpc_java/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/grpc_java/repo.bzl b/build/grpc_java/repo.bzl deleted file mode 100644 index ead8968a6..000000000 --- a/build/grpc_java/repo.bzl +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2022 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository rules/macros for grpc-java.""" - -load("//build:versions.bzl", "GRPC_JAVA", "versioned_http_archive") - -# Known coordinates for non-Android Maven artifacts built from grpc-java. -_MAVEN_COORDINATES = [ - "io.grpc:grpc-alts", - "io.grpc:grpc-api", - "io.grpc:grpc-auth", - "io.grpc:grpc-benchmarks", - "io.grpc:grpc-bom", - "io.grpc:grpc-census", - "io.grpc:grpc-context", - "io.grpc:grpc-core", - "io.grpc:grpc-googleapis", - "io.grpc:grpc-grpclb", - "io.grpc:grpc-netty", - "io.grpc:grpc-netty-shaded", - "io.grpc:grpc-okhttp", - "io.grpc:grpc-protobuf", - "io.grpc:grpc-protobuf-lite", - "io.grpc:grpc-rls", - "io.grpc:grpc-services", - "io.grpc:grpc-stub", - "io.grpc:grpc-testing", - "io.grpc:grpc-xds", -] - -def io_grpc_grpc_java(): - versioned_http_archive(GRPC_JAVA, "io_grpc_grpc_java") - -def grpc_java_maven_artifacts_dict(): - return { - coordinates: GRPC_JAVA.version - for coordinates in _MAVEN_COORDINATES - } diff --git a/build/grpc_kotlin/BUILD.bazel b/build/grpc_kotlin/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/grpc_kotlin/repo.bzl b/build/grpc_kotlin/repo.bzl deleted file mode 100644 index a4898870a..000000000 --- a/build/grpc_kotlin/repo.bzl +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Repository rules/macros for Github GPRC Kotlin. -""" - -load("//build:versions.bzl", "GRPC_KOTLIN", "versioned_http_archive") - -# kt_jvm_grpc_library directly depends on these library targets. -GRPC_KOTLIN_OVERRIDE_TARGETS = { - "io.grpc:grpc-kotlin-stub": "@com_github_grpc_grpc_kotlin//stub/src/main/java/io/grpc/kotlin:stub", -} - -def com_github_grpc_grpc_kotlin(): - versioned_http_archive(GRPC_KOTLIN, "com_github_grpc_grpc_kotlin") - -def grpc_kotlin_maven_artifacts_dict(): - return { - coordinates: GRPC_KOTLIN.version - for coordinates in GRPC_KOTLIN_OVERRIDE_TARGETS.keys() - } diff --git a/build/kotlinx_coroutines/BUILD.bazel b/build/kotlinx_coroutines/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/kotlinx_coroutines/repo.bzl b/build/kotlinx_coroutines/repo.bzl deleted file mode 100644 index 98cd7d9a9..000000000 --- a/build/kotlinx_coroutines/repo.bzl +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2020 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository defs for kotlinx-coroutines.""" - -load("//build:versions.bzl", "KOTLINX_COROUTINES_VERSION") - -_ARTIFACT_NAMES = [ - "org.jetbrains.kotlinx:kotlinx-coroutines-core", - "org.jetbrains.kotlinx:kotlinx-coroutines-debug", - "org.jetbrains.kotlinx:kotlinx-coroutines-guava", - "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", - "org.jetbrains.kotlinx:kotlinx-coroutines-reactive", - "org.jetbrains.kotlinx:kotlinx-coroutines-test", -] - -def kotlinx_coroutines_artifact_dict(): - return {name: KOTLINX_COROUTINES_VERSION for name in _ARTIFACT_NAMES} diff --git a/build/kt_jvm_proto/BUILD.bazel b/build/kt_jvm_proto/BUILD.bazel index b712fc463..e69de29bb 100644 --- a/build/kt_jvm_proto/BUILD.bazel +++ b/build/kt_jvm_proto/BUILD.bazel @@ -1,13 +0,0 @@ -load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_kotlinc_options") - -package(default_visibility = ["//visibility:public"]) - -sh_binary( - name = "extract_srcjars", - srcs = ["extract_srcjars.sh"], -) - -kt_kotlinc_options( - name = "proto_gen_kt_options", - warn = "off", -) diff --git a/build/kt_jvm_proto/defs.bzl b/build/kt_jvm_proto/defs.bzl index af2c0debb..1a802fe97 100644 --- a/build/kt_jvm_proto/defs.bzl +++ b/build/kt_jvm_proto/defs.bzl @@ -16,182 +16,31 @@ Provides kt_jvm_proto_library to generate Kotlin protos. """ -load("//build:defs.bzl", "get_real_short_path") -load("@rules_proto//proto:defs.bzl", "ProtoInfo") -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") - -KtProtoLibInfo = provider( - "Information for a Kotlin JVM proto library.", - fields = {"srcjars": "depset of .srcjar Files"}, -) - -def _run_protoc(ctx, proto_lib, output_dir): - """Executes protoc to generate Kotlin files.""" - proto_info = proto_lib[ProtoInfo] - descriptor_sets = proto_info.transitive_descriptor_sets - transitive_descriptor_set = depset(transitive = [descriptor_sets]) - proto_sources = [get_real_short_path(file) for file in proto_info.direct_sources] - - protoc_args = ctx.actions.args() - protoc_args.set_param_file_format("multiline") - protoc_args.use_param_file("@%s") - protoc_args.add("--kotlin_out=" + output_dir.path) - protoc_args.add_joined( - transitive_descriptor_set, - join_with = ctx.configuration.host_path_separator, - format_joined = "--descriptor_set_in=%s", - ) - protoc_args.add_all(proto_sources) - ctx.actions.run( - inputs = depset(transitive = [transitive_descriptor_set]), - outputs = [output_dir], - executable = ctx.executable._protoc, - arguments = [protoc_args], - mnemonic = "KtProtoc", - progress_message = "Generating Kotlin protos for " + ctx.label.name, - ) - -def _create_srcjar(ctx, input_dir, output_jar): - """Bundles .kt files into a srcjar.""" - zipper_args = ctx.actions.args() - zipper_args.add("c", output_jar) - zipper_args.add_all([input_dir]) - - ctx.actions.run( - outputs = [output_jar], - inputs = [input_dir], - executable = ctx.executable._zipper, - arguments = [zipper_args], - mnemonic = "KtProtoSrcJar", - progress_message = "Generating Kotlin proto srcjar for " + ctx.label.name, - ) - -def _merge_srcjars(ctx, input_jars, output_jar): - """Merges multiple srcjars into a single srcjar.""" - tmp_dir_name = ctx.label.name + "_srcjars" - tmp_dir = ctx.actions.declare_directory(tmp_dir_name) - - merge_args = ctx.actions.args() - merge_args.add(ctx.executable._zipper) - merge_args.add(tmp_dir.path) - merge_args.add_all(input_jars) - - ctx.actions.run( - outputs = [tmp_dir], - inputs = input_jars, - executable = ctx.executable._extract_srcjars, - tools = [ctx.executable._zipper], - arguments = [merge_args], - mnemonic = "KtProtoExtractSrcJars", - ) - - _create_srcjar(ctx, tmp_dir, output_jar) - -def _kt_jvm_proto_aspect_impl(target, ctx): - name = target.label.name - - gen_src_dir_name = name + "_kt_jvm_srcs" - gen_src_dir = ctx.actions.declare_directory(gen_src_dir_name) - _run_protoc(ctx, target, gen_src_dir) - - srcjar_name = name + "_kt_jvm.srcjar" - srcjar = ctx.actions.declare_file(srcjar_name) - _create_srcjar(ctx, gen_src_dir, srcjar) - - transitive = [ - dep[KtProtoLibInfo].srcjars - for dep in ctx.rule.attr.deps - if KtProtoLibInfo in dep - ] - return [KtProtoLibInfo( - srcjars = depset(direct = [srcjar], transitive = transitive), - )] - -_kt_jvm_proto_aspect = aspect( - attrs = { - "_zipper": attr.label( - default = Label("@bazel_tools//tools/zip:zipper"), - cfg = "exec", - executable = True, - ), - "_protoc": attr.label( - default = Label("@com_google_protobuf//:protoc"), - cfg = "exec", - executable = True, - ), - }, - implementation = _kt_jvm_proto_aspect_impl, - attr_aspects = ["deps"], +load( + "@wfa_rules_kotlin_jvm//kotlin:defs.bzl", + _kt_jvm_proto_library = "kt_jvm_proto_library", ) -def _kt_jvm_proto_library_helper_impl(ctx): - """Implementation of _kt_jvm_proto_library_helper rule.""" - proto_lib_info = ctx.attr.proto_dep[KtProtoLibInfo] - _merge_srcjars(ctx, proto_lib_info.srcjars, ctx.outputs.srcjar) +def kt_jvm_proto_library( + name, + srcs = None, + # buildifier: disable=unused-variable + deps = None, + **kwargs): + """Temporary forwarding macro for kt_jvm_proto_library. -_kt_jvm_proto_library_helper = rule( - attrs = { - "proto_dep": attr.label( - providers = [ProtoInfo], - aspects = [_kt_jvm_proto_aspect], - ), - "srcjar": attr.output( - doc = "Generated Java source jar.", - mandatory = True, - ), - "_zipper": attr.label( - default = Label("@bazel_tools//tools/zip:zipper"), - cfg = "exec", - executable = True, - ), - "_extract_srcjars": attr.label( - default = Label("@wfa_common_jvm//build/kt_jvm_proto:extract_srcjars"), - cfg = "exec", - executable = True, - ), - }, - implementation = _kt_jvm_proto_library_helper_impl, -) - -_KT_JVM_PROTO_DEPS = [ - "@com_google_protobuf_protobuf_kotlin", -] - -def kt_jvm_proto_library(name, srcs = None, deps = None, **kwargs): - """Generates Kotlin code for a protocol buffer library. - - For standard attributes, see: - https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes - - Args: - name: A name for the target - srcs: Exactly one proto_library target to generate Kotlin APIs for - deps: Exactly one java_proto_library target for srcs[0] - **kwargs: other args to pass to the ultimate kt_jvm_library target + Deprecated: + Use kt_jvm_proto_library from @wfa_rules_kotlin_jvm//kotlin:defs.bzl. """ - srcs = srcs or [] - deps = deps or [] - if len(srcs) != 1: - fail("Expected exactly one src", "srcs") - - if len(deps) != 1: - fail("Expected exactly one dep", "deps") - - generated_kt_name = name + "_DO_NOT_DEPEND_generated_kt" - generated_srcjar = generated_kt_name + ".srcjar" - _kt_jvm_proto_library_helper( - name = generated_kt_name, - proto_dep = srcs[0], - srcjar = generated_srcjar, - visibility = ["//visibility:private"], + # buildifier: disable=print + print( + "{context}: Use kt_jvm_proto_library from @wfa_rules_kotlin_jvm//kotlin:defs.bzl".format( + context = native.package_name(), + ), ) - - kt_jvm_library( + _kt_jvm_proto_library( name = name, - srcs = [generated_srcjar], - deps = deps + _KT_JVM_PROTO_DEPS, - exports = deps + _KT_JVM_PROTO_DEPS, - kotlinc_opts = "@wfa_common_jvm//build/kt_jvm_proto:proto_gen_kt_options", + deps = srcs, **kwargs ) diff --git a/build/kt_jvm_proto/extract_srcjars.sh b/build/kt_jvm_proto/extract_srcjars.sh deleted file mode 100755 index 8b34378eb..000000000 --- a/build/kt_jvm_proto/extract_srcjars.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# Extracts multiple srcjars to a single output directory. - -readonly zipper="$1" -readonly output_dir="$2" -shift 2 - -mkdir -p "${output_dir}" -for input_jar in "$@"; do - $zipper x "${input_jar}" -d "${output_dir}" -done diff --git a/build/kt_jvm_proto_library.bzl b/build/kt_jvm_proto_library.bzl deleted file mode 100644 index 4dd88703a..000000000 --- a/build/kt_jvm_proto_library.bzl +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Temporary forwarding macro for kt_jvm_proto_library.""" - -load("//build/kt_jvm_proto:defs.bzl", _kt_jvm_proto_library = "kt_jvm_proto_library") - -def kt_jvm_proto_library(**kwargs): - """Forwarding macro for kt_jvm_proto_library. - - Deprecated: - Load from @wfa_common_jvm//build/kt_jvm_proto:defs.bzl - """ - - # buildifier: disable=print - print( - "{context}: kt_jvm_proto_library should be loaded from @wfa_common_jvm//build/kt_jvm_proto:defs.bzl".format( - context = native.package_name(), - ), - ) - _kt_jvm_proto_library(**kwargs) diff --git a/build/macros.bzl b/build/macros.bzl index da18d804d..0c7353311 100644 --- a/build/macros.bzl +++ b/build/macros.bzl @@ -14,116 +14,22 @@ """Common macros.""" -load(":defs.bzl", "to_label") -load("@rules_java//java:defs.bzl", "java_library", "java_proto_library") load( - "@com_github_grpc_grpc_kotlin//:kt_jvm_grpc.bzl", - _kt_jvm_grpc_library = "kt_jvm_grpc_library", + "@wfa_rules_kotlin_jvm//kotlin:defs.bzl", + _kt_jvm_grpc_proto_library = "kt_jvm_grpc_proto_library", ) -load("//build/kt_jvm_proto:defs.bzl", "kt_jvm_proto_library") -def kt_jvm_grpc_library( - name, - srcs, - deps, - flavor = None, - visibility = None, - **kwargs): - """Wrapper macro for regular kt_jvm_grpc_library rule from grpc_kotlin. +def kt_jvm_grpc_proto_library(name, srcs = None, **kwargs): + """Forwarding macro for kt_jvm_grpc_proto_library. - This includes a convenience export for the java_proto_library dep. - - Args: - name: Target name. - srcs: Exactly one proto_library target. - deps: Exactly one java_proto_library target. - flavor: "normal" (default) for normal proto runtime, or "lite" for the - lite runtime (for Android usage) - visibility: List of visibility labels. - **kwargs: Keyword arguments. - """ - - internal_name = name + "_internal" - - _kt_jvm_grpc_library( - name = internal_name, - srcs = srcs, - deps = deps, - flavor = flavor, - visibility = ["//visibility:private"], - **kwargs - ) - java_library( - name = name, - exports = [ - internal_name, - ] + deps, - visibility = visibility, - **kwargs - ) - -def kt_jvm_grpc_proto_library( - name, - srcs, - flavor = None, - visibility = None, - **kwargs): - """java_library that exports Kotlin JVM gRPC service and proto libraries. - - Given a proto_library named `_proto`, this will create additional - `_java_proto`, `_kt_jvm_proto`, and `_kt_jvm_grpc` - targets. - - Args: - name: Target name. - srcs: Exactly one proto source file. - flavor: "normal" (default) for normal proto runtime, or "lite" for the - lite runtime (for Android usage) - visibility: List of visibility labels. - **kwargs: Keyword arguments. + Deprecated: + Use kt_jvm_grpc_proto_library from @wfa_rules_kotlin_jvm//kotlin:defs.bzl. """ - if len(srcs) != 1: - fail("Expected exactly one src", "srcs") - - proto_name = to_label(srcs[0]).name - if not proto_name.endswith("_proto"): - fail("proto_library target names should end with '_proto'") - name_prefix = proto_name.rsplit("_", 1)[0] - java_proto_name = name_prefix + "_java_proto" - kt_jvm_proto_name = name_prefix + "_kt_jvm_proto" - kt_jvm_grpc_name = name_prefix + "_kt_jvm_grpc" - - java_proto_library( - name = java_proto_name, - deps = srcs, - visibility = visibility, - **kwargs - ) - - kt_jvm_proto_library( - name = kt_jvm_proto_name, - srcs = srcs, - deps = [java_proto_name], - visibility = visibility, - **kwargs - ) - - _kt_jvm_grpc_library( - name = kt_jvm_grpc_name, - srcs = srcs, - deps = [java_proto_name], - flavor = flavor, - visibility = visibility, - **kwargs - ) - - java_library( - name = name, - exports = [ - kt_jvm_grpc_name, - kt_jvm_proto_name, - ], - visibility = visibility, - **kwargs + # buildifier: disable=print + print( + "{context}: Use kt_jvm_grpc_proto_library from @wfa_rules_kotlin_jvm//kotlin:defs.bzl".format( + context = native.package_name(), + ), ) + _kt_jvm_grpc_proto_library(name, deps = srcs, **kwargs) diff --git a/build/maven/BUILD.bazel b/build/maven/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/maven/artifacts.bzl b/build/maven/artifacts.bzl deleted file mode 100644 index 5061b88ef..000000000 --- a/build/maven/artifacts.bzl +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2020 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Maven artifact utils.""" - -def _list_to_dict(artifact_list): - """Returns a dict of artifact name to version.""" - tuples = [tuple(item.rsplit(":", 1)) for item in artifact_list] - return {name: version for (name, version) in tuples} - -def _dict_to_list(artifact_dict): - """Returns a list artifacts from a dict of name to version.""" - return [ - ":".join([name, version]) - for (name, version) in artifact_dict.items() - ] - -artifacts = struct( - list_to_dict = _list_to_dict, - dict_to_list = _dict_to_list, -) diff --git a/build/platforms/repo.bzl b/build/platforms/repo.bzl deleted file mode 100644 index 87a0a3dbc..000000000 --- a/build/platforms/repo.bzl +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Repository rules/macros for Platforms. -""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -def platforms_repo(): - if "platforms" not in native.existing_rules(): - http_archive( - name = "platforms", - sha256 = "079945598e4b6cc075846f7fd6a9d0857c33a7afc0de868c2ccb96405225135d", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz", - "https://github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz", - ], - ) diff --git a/build/protobuf/BUILD.bazel b/build/protobuf/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/protobuf/repo.bzl b/build/protobuf/repo.bzl deleted file mode 100644 index dc7364ea5..000000000 --- a/build/protobuf/repo.bzl +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Repository rules/macros for Protobuf. -""" - -load("//build:versions.bzl", "PROTOBUF", "versioned_http_archive") - -def com_github_protocolbuffers_protobuf(): - versioned_http_archive(PROTOBUF, "com_github_protocolbuffers_protobuf") diff --git a/build/rules_jvm_external/BUILD.bazel b/build/rules_jvm_external/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/rules_jvm_external/repo.bzl b/build/rules_jvm_external/repo.bzl deleted file mode 100644 index f20e40243..000000000 --- a/build/rules_jvm_external/repo.bzl +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Repository rules/macros for JVM External Rules. -""" - -load("//build:versions.bzl", "RULES_JVM_EXTERNAL", "versioned_http_archive") - -def rules_jvm_external_repo(): - versioned_http_archive(RULES_JVM_EXTERNAL, "rules_jvm_external") diff --git a/build/rules_kotlin/defs.bzl b/build/rules_kotlin/defs.bzl index 1010eda63..c704565d4 100644 --- a/build/rules_kotlin/defs.bzl +++ b/build/rules_kotlin/defs.bzl @@ -14,23 +14,19 @@ """Macros for kt_jvm_library to include Maven kotlin stdlib.""" -load( - "@io_bazel_rules_kotlin//kotlin:jvm.bzl", - _kt_jvm_library = "kt_jvm_library", -) +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", _kt_jvm_library = "kt_jvm_library") -_STDLIBS = [ - "@wfa_common_jvm//imports/kotlin/kotlin:stdlib", - "@wfa_common_jvm//imports/kotlin/kotlin/reflect", -] +def kt_jvm_library(*args, **kwargs): + """Forwarding macro for kt_jvm_library. -def kt_jvm_library(name, deps = None, exports = None, **kwargs): - deps = deps or [] - exports = exports or [] + Deprecated: + Load @wfa_rules_kotlin_jvm//kotlin:defs.bzl + """ - _kt_jvm_library( - name = name, - deps = deps + _STDLIBS, - exports = exports + _STDLIBS, - **kwargs + # buildifier: disable=print + print( + "{context}: kt_jvm_library should be loaded from @wfa_rules_kotlin_jvm//kotlin:defs.bzl".format( + context = native.package_name(), + ), ) + _kt_jvm_library(*args, **kwargs) diff --git a/build/rules_kotlin/deps.bzl b/build/rules_kotlin/deps.bzl deleted file mode 100644 index d7d12e34b..000000000 --- a/build/rules_kotlin/deps.bzl +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2020 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository rules/macros for rules_kotlin dependencies.""" - -load( - "@io_bazel_rules_kotlin//kotlin:repositories.bzl", - "kotlin_repositories", - "kotlinc_version", -) -load("//build:versions.bzl", "KOTLIN_RELEASE_VERSION") - -# Version of org.jetbrains:annotations that comes bundled with -# KOTLIN_RELEASE_VERSION. -JETBRAINS_ANNOTATIONS_VERSION = "13.0" - -# buildifier: disable=unnamed-macro -def rules_kotlin_deps(): - compiler_release = kotlinc_version( - release = KOTLIN_RELEASE_VERSION, - sha256 = "6e43c5569ad067492d04d92c28cdf8095673699d81ce460bd7270443297e8fd7", - ) - kotlin_repositories( - compiler_release = compiler_release, - ) - native.register_toolchains( - "@wfa_common_jvm//build/rules_kotlin/toolchain:toolchain", - ) diff --git a/build/rules_kotlin/repo.bzl b/build/rules_kotlin/repo.bzl deleted file mode 100644 index 0738622fa..000000000 --- a/build/rules_kotlin/repo.bzl +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2020 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository rules/macros for rules_kotlin. - -See https://github.com/bazelbuild/rules_kotlin -""" - -load( - "//build:versions.bzl", - "KOTLIN_RELEASE_VERSION", - "RULES_KOTLIN", - "versioned_http_archive", -) - -_JETBRAINS_KOTLIN_LIBRARIES = [ - "org.jetbrains.kotlin:kotlin-stdlib", - "org.jetbrains.kotlin:kotlin-stdlib-common", - "org.jetbrains.kotlin:kotlin-reflect", - "org.jetbrains.kotlin:kotlin-test", -] - -def io_bazel_rules_kotlin(): - versioned_http_archive(RULES_KOTLIN, "io_bazel_rules_kotlin") - -def rules_kotlin_maven_artifacts_dict(): - artifacts_dict = { - coordinates: KOTLIN_RELEASE_VERSION - for coordinates in _JETBRAINS_KOTLIN_LIBRARIES - } - return artifacts_dict diff --git a/build/rules_kotlin/toolchain/BUILD.bazel b/build/rules_kotlin/toolchain/BUILD.bazel deleted file mode 100644 index a3ccb3c49..000000000 --- a/build/rules_kotlin/toolchain/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load( - "@io_bazel_rules_kotlin//kotlin:core.bzl", - "define_kt_toolchain", - "kt_kotlinc_options", -) -load("//build:versions.bzl", "KOTLIN_LANGUAGE_LEVEL") - -kt_kotlinc_options( - name = "default_opts", - include_stdlibs = "none", - x_optin = ["kotlin.RequiresOptIn"], -) - -define_kt_toolchain( - name = "toolchain", - api_version = KOTLIN_LANGUAGE_LEVEL, - kotlinc_options = ":default_opts", - language_version = KOTLIN_LANGUAGE_LEVEL, -) diff --git a/build/rules_multirun/BUILD.bazel b/build/rules_multirun/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/rules_multirun/repo.bzl b/build/rules_multirun/repo.bzl deleted file mode 100644 index 5546ffe3b..000000000 --- a/build/rules_multirun/repo.bzl +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2023 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository targets for rules_multirun.""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -def rules_multirun(): - http_archive( - name = "rules_multirun", - sha256 = "9cd384e42b2da00104f0e18f25e66285aa21f64b573c667638a7a213206885ab", - strip_prefix = "rules_multirun-0.6.1", - url = "https://github.com/keith/rules_multirun/archive/refs/tags/0.6.1.tar.gz", - ) diff --git a/build/rules_oci/defs.bzl b/build/rules_oci/defs.bzl index 3d8687484..3261aa242 100644 --- a/build/rules_oci/defs.bzl +++ b/build/rules_oci/defs.bzl @@ -20,7 +20,7 @@ load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push_rule") load("@rules_pkg//pkg:mappings.bzl", "pkg_files") load("@rules_pkg//pkg:providers.bzl", "PackageFilesInfo") load("@rules_pkg//pkg:tar.bzl", "pkg_tar") -load("//build:defs.bzl", "expand_template", "to_label") +load("//build:defs.bzl", "expand_template") DEFAULT_JAVA_IMAGE_BASE = Label("@java_image_base") DEFAULT_JAVA_DEBUG_IMAGE_BASE = Label("@java_debug_image_base") @@ -106,7 +106,7 @@ def java_image( **kwargs: other args to pass to the resulting target """ env = env or {} - binary_label = to_label(binary) + binary_label = native.package_relative_label(binary) deploy_jar_label = binary_label.relative(binary_label.name + "_deploy.jar") cmd_args = cmd_args or [] diff --git a/build/rules_oci/repo.bzl b/build/rules_oci/repo.bzl deleted file mode 100644 index 4a05d2d86..000000000 --- a/build/rules_oci/repo.bzl +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2023 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository targets for rules_oci.""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -def rules_oci(): - http_archive( - name = "rules_oci", - sha256 = "d41d0ba7855f029ad0e5ee35025f882cbe45b0d5d570842c52704f7a47ba8668", - strip_prefix = "rules_oci-1.4.3", - url = "https://github.com/bazel-contrib/rules_oci/releases/download/v1.4.3/rules_oci-v1.4.3.tar.gz", - ) diff --git a/build/rules_pkg/BUILD.bazel b/build/rules_pkg/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/rules_pkg/repo.bzl b/build/rules_pkg/repo.bzl deleted file mode 100644 index c43ab2a66..000000000 --- a/build/rules_pkg/repo.bzl +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2022 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository rules/macros for rules_pkg.""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -def rules_pkg(): - http_archive( - name = "rules_pkg", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", - ], - sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2", - ) diff --git a/build/rules_proto/BUILD.bazel b/build/rules_proto/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/rules_proto/repo.bzl b/build/rules_proto/repo.bzl deleted file mode 100644 index dedf425d8..000000000 --- a/build/rules_proto/repo.bzl +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 2022 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Repository rules/macros for rules_proto.""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -load("//build:versions.bzl", "PROTOBUF_JAVA_VERSION") - -_MAVEN_COORDINATES = [ - "com.google.protobuf:protobuf-java", - "com.google.protobuf:protobuf-java-util", -] - -EXCLUDED_ARTIFACTS = [ - # protobuf-java and protobuf-javalite cannot coexist. - "com.google.protobuf:protobuf-javalite", -] - -def rules_proto(): - maybe( - http_archive, - name = "rules_proto", - sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd", - strip_prefix = "rules_proto-5.3.0-21.7", - urls = [ - "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz", - ], - ) - -def rules_proto_maven_artifacts_dict(): - return {coordinates: PROTOBUF_JAVA_VERSION for coordinates in _MAVEN_COORDINATES} diff --git a/build/variables.bzl b/build/variables.bzl deleted file mode 100644 index 4fbda3ccf..000000000 --- a/build/variables.bzl +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2020 The Measurement System Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -This file contains local settings for building and deploying the codebase. -It is in .gitignore; please don't commit your local changes. -""" - -# Settings for the repository where Docker images are stored. -# The image path is the container_registry, the prefix, and an -# image-specific suffix joined with slashes. -IMAGE_REPOSITORY_SETTINGS = struct( - # URL of the container registry. - container_registry = "", - - # Common prefix of all images. - repository_prefix = "", -) - -# Settings for deploying tests to Google Cloud. -TEST_GOOGLE_CLOUD_SETTINGS = struct( - spanner_project = "", - spanner_instance = "", - cloud_storage_project = "", - cloud_storage_bucket = "", -) diff --git a/build/versions.bzl b/build/versions.bzl index 13d42d281..620c5190e 100644 --- a/build/versions.bzl +++ b/build/versions.bzl @@ -50,70 +50,10 @@ def versioned_http_archive(versioned_archive, name): urls = _format_url_templates(versioned_archive), ) -PROTOBUF = VersionedArchiveInfo( - version = "21.12", - sha256 = "22fdaf641b31655d4b2297f9981fa5203b2866f8332d3c6333f6b0107bb320de", - url_templates = [ - "https://github.com/protocolbuffers/protobuf/archive/v{version}.tar.gz", - ], - prefix_template = "protobuf-{version}", -) - -PROTOBUF_JAVA_VERSION = "3." + PROTOBUF.version -PROTOBUF_KOTLIN_VERSION = PROTOBUF_JAVA_VERSION - -GRPC_JAVA = VersionedArchiveInfo( - version = "1.52.1", - sha256 = "6bbe6dca6e60bb892fec8000ab2a200c474c4d9700f34e3fa205c84aaeaf33f7", - url_templates = [ - "https://github.com/grpc/grpc-java/archive/refs/tags/v{version}.tar.gz", - ], - prefix_template = "grpc-java-{version}", -) -GRPC_KOTLIN = VersionedArchiveInfo( - version = "1.3.0", - sha256 = "466d33303aac7e825822b402efa3dcfddd68e6f566ed79443634180bb75eab6e", - url_templates = [ - "https://github.com/grpc/grpc-kotlin/archive/refs/tags/v{version}.tar.gz", - ], - prefix_template = "grpc-kotlin-{version}", -) - -RULES_JVM_EXTERNAL = VersionedArchiveInfo( - version = "5.2", - sha256 = "f86fd42a809e1871ca0aabe89db0d440451219c3ce46c58da240c7dcdc00125f", - url_templates = [ - "https://github.com/bazelbuild/rules_jvm_external/releases/download/{version}/rules_jvm_external-{version}.tar.gz", - ], - prefix_template = "rules_jvm_external-{version}", -) - SPANNER_EMULATOR = VersionedArchiveInfo( - version = "1.4.9", - sha256 = "0716bf95e740328cdaef7a7e41e022037fde803596378a9db81b56bc0de1dcb9", + version = "1.5.13", + sha256 = "0e90b10728d03b8d0a50773f4028e6989c0959945501017811f7159fc04af56a", url_templates = [ "https://storage.googleapis.com/cloud-spanner-emulator/releases/{version}/cloud-spanner-emulator_linux_amd64-{version}.tar.gz", ], ) - -RULES_KOTLIN = VersionedArchiveInfo( - version = "1.8.1", - sha256 = "a630cda9fdb4f56cf2dc20a4bf873765c41cf00e9379e8d59cd07b24730f4fde", - url_templates = [ - "https://github.com/bazelbuild/rules_kotlin/releases/download/v{version}/rules_kotlin_release.tgz", - ], -) - -KOTLIN_LANGUAGE_LEVEL = "1.8" - -# Kotlin release version. -# -# See https://kotlinlang.org/docs/releases.html#release-details. -KOTLIN_RELEASE_VERSION = "1.8.21" - -# kotlinx.coroutines version. -KOTLINX_COROUTINES_VERSION = "1.7.3" - -AWS_JAVA_SDK_VERSION = "2.17.258" - -OPENTELEMETRY_JAVA_VERSION = "1.32.0" diff --git a/build/wfa/BUILD.bazel b/build/wfa/BUILD.bazel deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/wfa/repositories.bzl b/build/wfa/repositories.bzl deleted file mode 100644 index 2a0d4fbf4..000000000 --- a/build/wfa/repositories.bzl +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2021 The Cross-Media Measurement Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""World Federation of Advertisers (WFA) GitHub repo macros.""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -_URL_TEMPLATE = "https://github.com/world-federation-of-advertisers/{repo}/archive/{commit}.tar.gz" -_PREFIX_TEMPLATE = "{repo}-{commit}" - -def wfa_repo_archive(name, repo, commit, sha256 = None): - """Adds a WFA repository archive target.""" - maybe( - http_archive, - name = name, - urls = [_URL_TEMPLATE.format(repo = repo, commit = commit)], - strip_prefix = _PREFIX_TEMPLATE.format(repo = repo, commit = commit), - sha256 = sha256, - ) diff --git a/imports/java/com/adobe/testing/s3mock/junit4/BUILD.bazel b/imports/java/com/adobe/testing/s3mock/junit4/BUILD.bazel index eab7ee12c..876717826 100644 --- a/imports/java/com/adobe/testing/s3mock/junit4/BUILD.bazel +++ b/imports/java/com/adobe/testing/s3mock/junit4/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "junit4", - actual = "@maven//:com_adobe_testing_s3mock_junit4", + actual = "@common_jvm_maven//:com_adobe_testing_s3mock_junit4", ) diff --git a/imports/java/com/github/luben/zstd/BUILD.bazel b/imports/java/com/github/luben/zstd/BUILD.bazel index e6e118cb8..43b0f9bdd 100644 --- a/imports/java/com/github/luben/zstd/BUILD.bazel +++ b/imports/java/com/github/luben/zstd/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "zstd", - actual = "@maven//:com_github_luben_zstd_jni", + actual = "@common_jvm_maven//:com_github_luben_zstd_jni", ) diff --git a/imports/java/com/google/api/core/BUILD.bazel b/imports/java/com/google/api/core/BUILD.bazel index 3a7d490c0..8d6bfb486 100644 --- a/imports/java/com/google/api/core/BUILD.bazel +++ b/imports/java/com/google/api/core/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "core", - actual = "@maven//:com_google_api_api_common", + actual = "@common_jvm_maven//:com_google_api_api_common", ) diff --git a/imports/java/com/google/api/gax/BUILD.bazel b/imports/java/com/google/api/gax/BUILD.bazel index aa3ba6442..2563611c1 100644 --- a/imports/java/com/google/api/gax/BUILD.bazel +++ b/imports/java/com/google/api/gax/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "gax", - actual = "@maven//:com_google_api_gax", + actual = "@common_jvm_maven//:com_google_api_gax", ) diff --git a/imports/java/com/google/api/services/bigquery/BUILD.bazel b/imports/java/com/google/api/services/bigquery/BUILD.bazel new file mode 100644 index 000000000..ee362b825 --- /dev/null +++ b/imports/java/com/google/api/services/bigquery/BUILD.bazel @@ -0,0 +1,6 @@ +package(default_visibility = ["//visibility:public"]) + +alias( + name = "bigquery", + actual = "@common_jvm_maven//:com_google_apis_google_api_services_bigquery", +) diff --git a/imports/java/com/google/cloud/BUILD.bazel b/imports/java/com/google/cloud/BUILD.bazel index 2b712ec5f..ce428d936 100644 --- a/imports/java/com/google/cloud/BUILD.bazel +++ b/imports/java/com/google/cloud/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "core", - actual = "@maven//:com_google_cloud_google_cloud_core", + actual = "@common_jvm_maven//:com_google_cloud_google_cloud_core", ) diff --git a/imports/java/com/google/cloud/bigquery/BUILD.bazel b/imports/java/com/google/cloud/bigquery/BUILD.bazel index abbeb4683..ed0372a50 100644 --- a/imports/java/com/google/cloud/bigquery/BUILD.bazel +++ b/imports/java/com/google/cloud/bigquery/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "bigquery", - actual = "@maven//:com_google_cloud_google_cloud_bigquery", + actual = "@common_jvm_maven//:com_google_cloud_google_cloud_bigquery", ) diff --git a/imports/java/com/google/cloud/grpc/BUILD.bazel b/imports/java/com/google/cloud/grpc/BUILD.bazel index e339f9e94..271422c1b 100644 --- a/imports/java/com/google/cloud/grpc/BUILD.bazel +++ b/imports/java/com/google/cloud/grpc/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "grpc", - actual = "@maven//:com_google_cloud_google_cloud_core_grpc", + actual = "@common_jvm_maven//:com_google_cloud_google_cloud_core_grpc", ) diff --git a/imports/java/com/google/cloud/spanner/BUILD.bazel b/imports/java/com/google/cloud/spanner/BUILD.bazel index 7a5aa6ac9..e17a9d23a 100644 --- a/imports/java/com/google/cloud/spanner/BUILD.bazel +++ b/imports/java/com/google/cloud/spanner/BUILD.bazel @@ -1,16 +1,6 @@ -load("@rules_java//java:defs.bzl", "java_library") - package(default_visibility = ["//visibility:public"]) -java_library( +alias( name = "spanner", - exports = [ - "@maven//:com_google_cloud_google_cloud_spanner", - - # Also export transitive deps com.google.api.core and com.google.api.gax - # to fix IntelliJ -- it doesn't pick up on these by itself. - "//imports/java/com/google/api/core", - "//imports/java/com/google/api/gax", - "//imports/java/com/google/cloud/grpc", - ], + actual = "@common_jvm_maven//:com_google_cloud_google_cloud_spanner", ) diff --git a/imports/java/com/google/cloud/sql/BUILD.bazel b/imports/java/com/google/cloud/sql/BUILD.bazel index efdf2f1c9..ee46199dc 100644 --- a/imports/java/com/google/cloud/sql/BUILD.bazel +++ b/imports/java/com/google/cloud/sql/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "r2dbc-core", - actual = "@maven//:com_google_cloud_sql_cloud_sql_connector_r2dbc_core", + actual = "@common_jvm_maven//:com_google_cloud_sql_cloud_sql_connector_r2dbc_core", ) diff --git a/imports/java/com/google/cloud/sql/postgres/BUILD.bazel b/imports/java/com/google/cloud/sql/postgres/BUILD.bazel index b5b3371ab..200bfaae7 100644 --- a/imports/java/com/google/cloud/sql/postgres/BUILD.bazel +++ b/imports/java/com/google/cloud/sql/postgres/BUILD.bazel @@ -2,10 +2,10 @@ package(default_visibility = ["//visibility:public"]) alias( name = "j2dbc", - actual = "@maven//:com_google_cloud_sql_postgres_socket_factory", + actual = "@common_jvm_maven//:com_google_cloud_sql_postgres_socket_factory", ) alias( name = "r2dbc", - actual = "@maven//:com_google_cloud_sql_cloud_sql_connector_r2dbc_postgres", + actual = "@common_jvm_maven//:com_google_cloud_sql_cloud_sql_connector_r2dbc_postgres", ) diff --git a/imports/java/com/google/cloud/storage/BUILD.bazel b/imports/java/com/google/cloud/storage/BUILD.bazel index 05d8ce223..645040471 100644 --- a/imports/java/com/google/cloud/storage/BUILD.bazel +++ b/imports/java/com/google/cloud/storage/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "storage", - actual = "@maven//:com_google_cloud_google_cloud_storage", + actual = "@common_jvm_maven//:com_google_cloud_google_cloud_storage", ) diff --git a/imports/java/com/google/cloud/storage/contrib/nio/BUILD.bazel b/imports/java/com/google/cloud/storage/contrib/nio/BUILD.bazel index 8ecc501be..ece8149ba 100644 --- a/imports/java/com/google/cloud/storage/contrib/nio/BUILD.bazel +++ b/imports/java/com/google/cloud/storage/contrib/nio/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "nio", - actual = "@maven//:com_google_cloud_google_cloud_nio", + actual = "@common_jvm_maven//:com_google_cloud_google_cloud_nio", ) diff --git a/imports/java/com/google/common/BUILD.bazel b/imports/java/com/google/common/BUILD.bazel index eb164b1f9..1ab2090b8 100644 --- a/imports/java/com/google/common/BUILD.bazel +++ b/imports/java/com/google/common/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "guava", - actual = "@maven//:com_google_guava_guava", + actual = "@wfa_rules_kotlin_jvm//imports/com/google/common:guava", ) diff --git a/imports/java/com/google/common/truth/BUILD.bazel b/imports/java/com/google/common/truth/BUILD.bazel index 13a803a1f..8b317c424 100644 --- a/imports/java/com/google/common/truth/BUILD.bazel +++ b/imports/java/com/google/common/truth/BUILD.bazel @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"]) java_library( name = "truth", exports = [ - "@maven//:com_google_truth_extensions_truth_java8_extension", - "@maven//:com_google_truth_truth", + "@common_jvm_maven//:com_google_truth_extensions_truth_java8_extension", + "@common_jvm_maven//:com_google_truth_truth", ], ) diff --git a/imports/java/com/google/common/truth/extensions/proto/BUILD.bazel b/imports/java/com/google/common/truth/extensions/proto/BUILD.bazel index 69760aa73..1ef5c9d8e 100644 --- a/imports/java/com/google/common/truth/extensions/proto/BUILD.bazel +++ b/imports/java/com/google/common/truth/extensions/proto/BUILD.bazel @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"]) java_library( name = "proto", exports = [ - "@maven//:com_google_truth_extensions_truth_liteproto_extension", - "@maven//:com_google_truth_extensions_truth_proto_extension", + "@common_jvm_maven//:com_google_truth_extensions_truth_liteproto_extension", + "@common_jvm_maven//:com_google_truth_extensions_truth_proto_extension", ], ) diff --git a/imports/java/com/google/crypto/tink/BUILD.bazel b/imports/java/com/google/crypto/tink/BUILD.bazel index afd5b2bd1..4a2076456 100644 --- a/imports/java/com/google/crypto/tink/BUILD.bazel +++ b/imports/java/com/google/crypto/tink/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "tink", - actual = "@maven//:com_google_crypto_tink_tink", + actual = "@common_jvm_maven//:com_google_crypto_tink_tink", ) diff --git a/imports/java/com/google/gson/BUILD.bazel b/imports/java/com/google/gson/BUILD.bazel index 7aedb3eaf..4bb9fe0a5 100644 --- a/imports/java/com/google/gson/BUILD.bazel +++ b/imports/java/com/google/gson/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "gson", - actual = "@maven//:com_google_code_gson_gson", + actual = "@common_jvm_maven//:com_google_code_gson_gson", ) diff --git a/imports/java/com/google/protobuf/BUILD.bazel b/imports/java/com/google/protobuf/BUILD.bazel index 205f678c9..9266823ee 100644 --- a/imports/java/com/google/protobuf/BUILD.bazel +++ b/imports/java/com/google/protobuf/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "protobuf", - actual = "@maven//:com_google_protobuf_protobuf_java", + actual = "@wfa_rules_kotlin_jvm//imports/com/google/protobuf", ) diff --git a/imports/java/com/google/protobuf/util/BUILD.bazel b/imports/java/com/google/protobuf/util/BUILD.bazel index 165a11f38..e4222afbd 100644 --- a/imports/java/com/google/protobuf/util/BUILD.bazel +++ b/imports/java/com/google/protobuf/util/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "util", - actual = "@maven//:com_google_protobuf_protobuf_java_util", + actual = "@common_jvm_maven//:com_google_protobuf_protobuf_java_util", ) diff --git a/imports/java/com/google/type/BUILD.bazel b/imports/java/com/google/type/BUILD.bazel deleted file mode 100644 index 6ea1b7b85..000000000 --- a/imports/java/com/google/type/BUILD.bazel +++ /dev/null @@ -1,6 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -alias( - name = "type_java_proto", - actual = "@com_google_googleapis//google/type:type_java_proto", -) diff --git a/imports/java/com/opencsv/BUILD.bazel b/imports/java/com/opencsv/BUILD.bazel index 72fab442d..3df523521 100644 --- a/imports/java/com/opencsv/BUILD.bazel +++ b/imports/java/com/opencsv/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "opencsv", - actual = "@maven//:com_opencsv_opencsv", + actual = "@common_jvm_maven//:com_opencsv_opencsv", ) diff --git a/imports/java/io/grpc/BUILD.bazel b/imports/java/io/grpc/BUILD.bazel index 1b524685e..a1e164aaf 100644 --- a/imports/java/io/grpc/BUILD.bazel +++ b/imports/java/io/grpc/BUILD.bazel @@ -2,15 +2,15 @@ package(default_visibility = ["//visibility:public"]) alias( name = "core", - actual = "@maven//:io_grpc_grpc_core", + actual = "@common_jvm_maven//:io_grpc_grpc_core", ) alias( name = "api", - actual = "@maven//:io_grpc_grpc_api", + actual = "@wfa_rules_kotlin_jvm//imports/io/gprc:api", ) alias( name = "context", - actual = "@maven//:io_grpc_grpc_context", + actual = "@common_jvm_maven//:io_grpc_grpc_context", ) diff --git a/imports/java/io/grpc/inprocess/BUILD.bazel b/imports/java/io/grpc/inprocess/BUILD.bazel new file mode 100644 index 000000000..4f509a219 --- /dev/null +++ b/imports/java/io/grpc/inprocess/BUILD.bazel @@ -0,0 +1,6 @@ +package(default_visibility = ["//visibility:public"]) + +alias( + name = "inprocess", + actual = "@common_jvm_maven//:io_grpc_grpc_inprocess", +) diff --git a/imports/java/io/grpc/netty/BUILD.bazel b/imports/java/io/grpc/netty/BUILD.bazel index 6740227e3..68af5918c 100644 --- a/imports/java/io/grpc/netty/BUILD.bazel +++ b/imports/java/io/grpc/netty/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "netty", - actual = "@maven//:io_grpc_grpc_netty", + actual = "@common_jvm_maven//:io_grpc_grpc_netty", ) diff --git a/imports/java/io/grpc/protobuf/BUILD.bazel b/imports/java/io/grpc/protobuf/BUILD.bazel index fa0abe2dd..2a1fccae0 100644 --- a/imports/java/io/grpc/protobuf/BUILD.bazel +++ b/imports/java/io/grpc/protobuf/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "protobuf", - actual = "@maven//:io_grpc_grpc_protobuf", + actual = "@wfa_rules_kotlin_jvm//imports/io/gprc/protobuf", ) diff --git a/imports/java/io/grpc/protobuf/services/BUILD.bazel b/imports/java/io/grpc/protobuf/services/BUILD.bazel index c78348c2d..883b7ab18 100644 --- a/imports/java/io/grpc/protobuf/services/BUILD.bazel +++ b/imports/java/io/grpc/protobuf/services/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "services", - actual = "@maven//:io_grpc_grpc_services", + actual = "@common_jvm_maven//:io_grpc_grpc_services", ) diff --git a/imports/java/io/grpc/stub/BUILD.bazel b/imports/java/io/grpc/stub/BUILD.bazel index dc5fee0b0..ce9085977 100644 --- a/imports/java/io/grpc/stub/BUILD.bazel +++ b/imports/java/io/grpc/stub/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "stub", - actual = "@maven//:io_grpc_grpc_stub", + actual = "@wfa_rules_kotlin_jvm//imports/io/gprc/stub", ) diff --git a/imports/java/io/grpc/testing/BUILD.bazel b/imports/java/io/grpc/testing/BUILD.bazel index 3c962e20a..0ee7cce07 100644 --- a/imports/java/io/grpc/testing/BUILD.bazel +++ b/imports/java/io/grpc/testing/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "testing", - actual = "@maven//:io_grpc_grpc_testing", + actual = "@common_jvm_maven//:io_grpc_grpc_testing", ) diff --git a/imports/java/io/netty/handler/BUILD.bazel b/imports/java/io/netty/handler/BUILD.bazel index 9b6b79061..0d48b517d 100644 --- a/imports/java/io/netty/handler/BUILD.bazel +++ b/imports/java/io/netty/handler/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "handler", - actual = "@maven//:io_netty_netty_handler", + actual = "@common_jvm_maven//:io_netty_netty_handler", ) diff --git a/imports/java/io/opentelemetry/api/BUILD.bazel b/imports/java/io/opentelemetry/api/BUILD.bazel index 1438dd69e..3a7694413 100644 --- a/imports/java/io/opentelemetry/api/BUILD.bazel +++ b/imports/java/io/opentelemetry/api/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "api", - actual = "@maven//:io_opentelemetry_opentelemetry_api", + actual = "@common_jvm_maven//:io_opentelemetry_opentelemetry_api", ) diff --git a/imports/java/io/opentelemetry/context/BUILD.bazel b/imports/java/io/opentelemetry/context/BUILD.bazel index 87632626f..e21a02cd7 100644 --- a/imports/java/io/opentelemetry/context/BUILD.bazel +++ b/imports/java/io/opentelemetry/context/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "context", - actual = "@maven//:io_opentelemetry_opentelemetry_context", + actual = "@common_jvm_maven//:io_opentelemetry_opentelemetry_context", ) diff --git a/imports/java/io/projectreactor/BUILD.bazel b/imports/java/io/projectreactor/BUILD.bazel index 980b81295..81b467c17 100644 --- a/imports/java/io/projectreactor/BUILD.bazel +++ b/imports/java/io/projectreactor/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "core", - actual = "@maven//:io_projectreactor_reactor_core", + actual = "@common_jvm_maven//:io_projectreactor_reactor_core", ) diff --git a/imports/java/io/r2dbc/BUILD.bazel b/imports/java/io/r2dbc/BUILD.bazel index bec8a8e8c..847838df7 100644 --- a/imports/java/io/r2dbc/BUILD.bazel +++ b/imports/java/io/r2dbc/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "r2dbc", - actual = "@maven//:io_r2dbc_r2dbc_spi", + actual = "@common_jvm_maven//:io_r2dbc_r2dbc_spi", ) diff --git a/imports/java/liquibase/BUILD.bazel b/imports/java/liquibase/BUILD.bazel index 687c0f379..a40953dc3 100644 --- a/imports/java/liquibase/BUILD.bazel +++ b/imports/java/liquibase/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "core", - actual = "@maven//:org_liquibase_liquibase_core", + actual = "@common_jvm_maven//:org_liquibase_liquibase_core", ) diff --git a/imports/java/liquibase/ext/BUILD.bazel b/imports/java/liquibase/ext/BUILD.bazel index 94505de1b..08aca7777 100644 --- a/imports/java/liquibase/ext/BUILD.bazel +++ b/imports/java/liquibase/ext/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "postgresql", - actual = "@maven//:org_liquibase_ext_liquibase_postgresql", + actual = "@common_jvm_maven//:org_liquibase_ext_liquibase_postgresql", ) diff --git a/imports/java/liquibase/ext/spanner/BUILD.bazel b/imports/java/liquibase/ext/spanner/BUILD.bazel index 4d9ead0a6..17df7bfb3 100644 --- a/imports/java/liquibase/ext/spanner/BUILD.bazel +++ b/imports/java/liquibase/ext/spanner/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "spanner", - actual = "@maven//:com_google_cloudspannerecosystem_liquibase_spanner", + actual = "@common_jvm_maven//:com_google_cloudspannerecosystem_liquibase_spanner", ) diff --git a/imports/java/org/apache/commons/BUILD.bazel b/imports/java/org/apache/commons/BUILD.bazel index b9b0ba764..b1b217f00 100644 --- a/imports/java/org/apache/commons/BUILD.bazel +++ b/imports/java/org/apache/commons/BUILD.bazel @@ -2,10 +2,10 @@ package(default_visibility = ["//visibility:public"]) alias( name = "math3", - actual = "@maven//:org_apache_commons_commons_math3", + actual = "@common_jvm_maven//:org_apache_commons_commons_math3", ) alias( name = "compress", - actual = "@maven//:org_apache_commons_commons_compress", + actual = "@common_jvm_maven//:org_apache_commons_commons_compress", ) diff --git a/imports/java/org/apache/commons/numbers/gamma/BUILD.bazel b/imports/java/org/apache/commons/numbers/gamma/BUILD.bazel index 54fab331e..f7020b19c 100644 --- a/imports/java/org/apache/commons/numbers/gamma/BUILD.bazel +++ b/imports/java/org/apache/commons/numbers/gamma/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "gamma", - actual = "@maven//:org_apache_commons_commons_numbers_gamma", + actual = "@common_jvm_maven//:org_apache_commons_commons_numbers_gamma", ) diff --git a/imports/java/org/brotli/dec/BUILD.bazel b/imports/java/org/brotli/dec/BUILD.bazel index 8980265f3..c9ea11ae6 100644 --- a/imports/java/org/brotli/dec/BUILD.bazel +++ b/imports/java/org/brotli/dec/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "dec", - actual = "@maven//:org_brotli_dec", + actual = "@common_jvm_maven//:org_brotli_dec", ) diff --git a/imports/java/org/conscrypt/BUILD.bazel b/imports/java/org/conscrypt/BUILD.bazel index ec68402c0..316ec6bdc 100644 --- a/imports/java/org/conscrypt/BUILD.bazel +++ b/imports/java/org/conscrypt/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "conscrypt", - actual = "@maven//:org_conscrypt_conscrypt_openjdk_uber", + actual = "@common_jvm_maven//:org_conscrypt_conscrypt_openjdk_uber", ) diff --git a/imports/java/org/jetbrains/annotations/BUILD.bazel b/imports/java/org/jetbrains/annotations/BUILD.bazel index 84abf1f55..5976572f1 100644 --- a/imports/java/org/jetbrains/annotations/BUILD.bazel +++ b/imports/java/org/jetbrains/annotations/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "annotations", - actual = "@maven//:org_jetbrains_annotations", + actual = "@common_jvm_maven//:org_jetbrains_annotations", ) diff --git a/imports/java/org/junit/BUILD.bazel b/imports/java/org/junit/BUILD.bazel index 413551190..6d20d1948 100644 --- a/imports/java/org/junit/BUILD.bazel +++ b/imports/java/org/junit/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "junit", - actual = "@maven//:junit_junit", + actual = "@common_jvm_maven//:junit_junit", ) diff --git a/imports/java/org/mockito/BUILD.bazel b/imports/java/org/mockito/BUILD.bazel index 651f82b5d..99891cfb0 100644 --- a/imports/java/org/mockito/BUILD.bazel +++ b/imports/java/org/mockito/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "mockito", - actual = "@maven//:org_mockito_mockito_core", + actual = "@common_jvm_maven//:org_mockito_mockito_core", ) diff --git a/imports/java/org/postgresql/BUILD.bazel b/imports/java/org/postgresql/BUILD.bazel index 6029313f3..b923fd6d3 100644 --- a/imports/java/org/postgresql/BUILD.bazel +++ b/imports/java/org/postgresql/BUILD.bazel @@ -2,10 +2,10 @@ package(default_visibility = ["//visibility:public"]) alias( name = "r2dbc", - actual = "@maven//:org_postgresql_r2dbc_postgresql", + actual = "@common_jvm_maven//:org_postgresql_r2dbc_postgresql", ) alias( name = "j2dbc", - actual = "@maven//:org_postgresql_postgresql", + actual = "@common_jvm_maven//:org_postgresql_postgresql", ) diff --git a/imports/java/org/reactivestreams/BUILD.bazel b/imports/java/org/reactivestreams/BUILD.bazel index c6b5f3d18..6587ea9de 100644 --- a/imports/java/org/reactivestreams/BUILD.bazel +++ b/imports/java/org/reactivestreams/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "reactivestreams", - actual = "@maven//:org_reactivestreams_reactive_streams", + actual = "@common_jvm_maven//:org_reactivestreams_reactive_streams", ) diff --git a/imports/java/org/testcontainers/containers/BUILD.bazel b/imports/java/org/testcontainers/containers/BUILD.bazel index 0816861ce..c80b76ac1 100644 --- a/imports/java/org/testcontainers/containers/BUILD.bazel +++ b/imports/java/org/testcontainers/containers/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "postgresql", - actual = "@maven//:org_testcontainers_postgresql", + actual = "@common_jvm_maven//:org_testcontainers_postgresql", ) diff --git a/imports/java/org/yaml/BUILD.bazel b/imports/java/org/yaml/BUILD.bazel index 4d5561de2..dc0cc3c22 100644 --- a/imports/java/org/yaml/BUILD.bazel +++ b/imports/java/org/yaml/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "snakeyaml", - actual = "@maven//:org_yaml_snakeyaml", + actual = "@common_jvm_maven//:org_yaml_snakeyaml", ) diff --git a/imports/java/picocli/BUILD.bazel b/imports/java/picocli/BUILD.bazel index 455ce9ba7..23997532b 100644 --- a/imports/java/picocli/BUILD.bazel +++ b/imports/java/picocli/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "picocli", - actual = "@maven//:info_picocli_picocli", + actual = "@common_jvm_maven//:info_picocli_picocli", ) diff --git a/imports/java/software/amazon/awssdk/auth/BUILD.bazel b/imports/java/software/amazon/awssdk/auth/BUILD.bazel new file mode 100644 index 000000000..a760f85cb --- /dev/null +++ b/imports/java/software/amazon/awssdk/auth/BUILD.bazel @@ -0,0 +1,6 @@ +package(default_visibility = ["//visibility:public"]) + +alias( + name = "auth", + actual = "@common_jvm_maven//:software_amazon_awssdk_auth", +) diff --git a/imports/java/software/amazon/awssdk/services/regions/BUILD.bazel b/imports/java/software/amazon/awssdk/services/regions/BUILD.bazel index 736f99201..1121e539d 100644 --- a/imports/java/software/amazon/awssdk/services/regions/BUILD.bazel +++ b/imports/java/software/amazon/awssdk/services/regions/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "regions", - actual = "@maven//:software_amazon_awssdk_regions", + actual = "@common_jvm_maven//:software_amazon_awssdk_regions", ) diff --git a/imports/java/software/amazon/awssdk/services/s3/BUILD.bazel b/imports/java/software/amazon/awssdk/services/s3/BUILD.bazel index fa69659b0..a2b4d57a0 100644 --- a/imports/java/software/amazon/awssdk/services/s3/BUILD.bazel +++ b/imports/java/software/amazon/awssdk/services/s3/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "s3", - actual = "@maven//:software_amazon_awssdk_s3", + actual = "@common_jvm_maven//:software_amazon_awssdk_s3", ) diff --git a/imports/java/software/amazon/awssdk/services/secretsmanager/BUILD.bazel b/imports/java/software/amazon/awssdk/services/secretsmanager/BUILD.bazel index 5f1d42de6..f2a2e05a9 100644 --- a/imports/java/software/amazon/awssdk/services/secretsmanager/BUILD.bazel +++ b/imports/java/software/amazon/awssdk/services/secretsmanager/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "secretsmanager", - actual = "@maven//:software_amazon_awssdk_secretsmanager", + actual = "@common_jvm_maven//:software_amazon_awssdk_secretsmanager", ) diff --git a/imports/java/software/amazon/awssdk/services/sts/BUILD.bazel b/imports/java/software/amazon/awssdk/services/sts/BUILD.bazel index 5077d7272..b0225d9aa 100644 --- a/imports/java/software/amazon/awssdk/services/sts/BUILD.bazel +++ b/imports/java/software/amazon/awssdk/services/sts/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "sts", - actual = "@maven//:software_amazon_awssdk_sts", + actual = "@common_jvm_maven//:software_amazon_awssdk_sts", ) diff --git a/imports/kotlin/com/google/protobuf/kotlin/BUILD.bazel b/imports/kotlin/com/google/protobuf/kotlin/BUILD.bazel index 88277f1e0..4d2b3f5d5 100644 --- a/imports/kotlin/com/google/protobuf/kotlin/BUILD.bazel +++ b/imports/kotlin/com/google/protobuf/kotlin/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "kotlin", - actual = "@maven//:com_google_protobuf_protobuf_kotlin", + actual = "@wfa_rules_kotlin_jvm//imports/com/google/protobuf/kotlin", ) diff --git a/imports/kotlin/com/google/type/BUILD.bazel b/imports/kotlin/com/google/type/BUILD.bazel new file mode 100644 index 000000000..bf701da74 --- /dev/null +++ b/imports/kotlin/com/google/type/BUILD.bazel @@ -0,0 +1,23 @@ +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_proto_library") + +package(default_visibility = ["//visibility:public"]) + +kt_jvm_proto_library( + name = "dayofweek_kt_jvm_proto", + deps = ["@com_google_googleapis//google/type:dayofweek_proto"], +) + +kt_jvm_proto_library( + name = "date_kt_jvm_proto", + deps = ["@com_google_googleapis//google/type:date_proto"], +) + +kt_jvm_proto_library( + name = "latlng_kt_jvm_proto", + deps = ["@com_google_googleapis//google/type:latlng_proto"], +) + +kt_jvm_proto_library( + name = "interval_kt_jvm_proto", + deps = ["@com_google_googleapis//google/type:interval_proto"], +) diff --git a/imports/kotlin/io/grpc/health/v1/BUILD.bazel b/imports/kotlin/io/grpc/health/v1/BUILD.bazel index 82ebd9bd7..40cf184c2 100644 --- a/imports/kotlin/io/grpc/health/v1/BUILD.bazel +++ b/imports/kotlin/io/grpc/health/v1/BUILD.bazel @@ -1,9 +1,11 @@ -load("@com_github_grpc_grpc_kotlin//:kt_jvm_grpc.bzl", "kt_jvm_grpc_library") +load( + "@wfa_rules_kotlin_jvm//kotlin:defs.bzl", + "kt_jvm_grpc_proto_library", +) package(default_visibility = ["//visibility:public"]) -kt_jvm_grpc_library( - name = "health_kt_jvm_grpc", - srcs = ["@io_grpc_grpc_proto//:health_proto"], - deps = ["@io_grpc_grpc_proto//:health_java_proto"], +kt_jvm_grpc_proto_library( + name = "health_kt_jvm_grpc_proto", + deps = ["@io_grpc_grpc_proto//:health_proto"], ) diff --git a/imports/kotlin/io/grpc/kotlin/BUILD.bazel b/imports/kotlin/io/grpc/kotlin/BUILD.bazel index bd5cee8fb..0209973e4 100644 --- a/imports/kotlin/io/grpc/kotlin/BUILD.bazel +++ b/imports/kotlin/io/grpc/kotlin/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "stub", - actual = "@maven//:io_grpc_grpc_kotlin_stub", + actual = "@wfa_rules_kotlin_jvm//imports/io/gprc/kotlin:stub", ) diff --git a/imports/kotlin/kotlin/BUILD.bazel b/imports/kotlin/kotlin/BUILD.bazel index 971ef2125..9ac6c37de 100644 --- a/imports/kotlin/kotlin/BUILD.bazel +++ b/imports/kotlin/kotlin/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "stdlib", - actual = "@maven//:org_jetbrains_kotlin_kotlin_stdlib", + actual = "@wfa_rules_kotlin_jvm//imports/kotlin:stdlib", ) diff --git a/imports/kotlin/kotlin/reflect/BUILD.bazel b/imports/kotlin/kotlin/reflect/BUILD.bazel index eb2c71997..06406c7f4 100644 --- a/imports/kotlin/kotlin/reflect/BUILD.bazel +++ b/imports/kotlin/kotlin/reflect/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "reflect", - actual = "@maven//:org_jetbrains_kotlin_kotlin_reflect", + actual = "@wfa_rules_kotlin_jvm//imports/kotlin/reflect", ) diff --git a/imports/kotlin/kotlin/test/BUILD.bazel b/imports/kotlin/kotlin/test/BUILD.bazel index c4bddcf79..3d1834272 100644 --- a/imports/kotlin/kotlin/test/BUILD.bazel +++ b/imports/kotlin/kotlin/test/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "test", - actual = "@maven//:org_jetbrains_kotlin_kotlin_test", + actual = "@wfa_rules_kotlin_jvm//imports/kotlin/test", ) diff --git a/imports/kotlin/kotlinx/coroutines/BUILD.bazel b/imports/kotlin/kotlinx/coroutines/BUILD.bazel index aef4323dd..ca333d27c 100644 --- a/imports/kotlin/kotlinx/coroutines/BUILD.bazel +++ b/imports/kotlin/kotlinx/coroutines/BUILD.bazel @@ -1,16 +1,6 @@ -load("@rules_java//java:defs.bzl", "java_library") - package(default_visibility = ["//visibility:public"]) -java_library( - name = "core", - exports = [ - "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core", - "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm", - ], -) - alias( - name = "jdk8", - actual = "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_jdk8", + name = "core", + actual = "@wfa_rules_kotlin_jvm//imports/kotlinx/coroutines:core", ) diff --git a/imports/kotlin/kotlinx/coroutines/debug/BUILD.bazel b/imports/kotlin/kotlinx/coroutines/debug/BUILD.bazel index 0020dc4e6..f9e9e6ad6 100644 --- a/imports/kotlin/kotlinx/coroutines/debug/BUILD.bazel +++ b/imports/kotlin/kotlinx/coroutines/debug/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "debug", - actual = "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_debug", + actual = "@common_jvm_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_debug", ) diff --git a/imports/kotlin/kotlinx/coroutines/guava/BUILD.bazel b/imports/kotlin/kotlinx/coroutines/guava/BUILD.bazel index 88a3c2a6f..f2493d5ee 100644 --- a/imports/kotlin/kotlinx/coroutines/guava/BUILD.bazel +++ b/imports/kotlin/kotlinx/coroutines/guava/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "guava", - actual = "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_guava", + actual = "@common_jvm_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_guava", ) diff --git a/imports/kotlin/kotlinx/coroutines/reactive/BUILD.bazel b/imports/kotlin/kotlinx/coroutines/reactive/BUILD.bazel index 023cc277b..96709bed2 100644 --- a/imports/kotlin/kotlinx/coroutines/reactive/BUILD.bazel +++ b/imports/kotlin/kotlinx/coroutines/reactive/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "reactive", - actual = "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_reactive", + actual = "@common_jvm_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_reactive", ) diff --git a/imports/kotlin/kotlinx/coroutines/test/BUILD.bazel b/imports/kotlin/kotlinx/coroutines/test/BUILD.bazel index 9194b3671..395cfb66a 100644 --- a/imports/kotlin/kotlinx/coroutines/test/BUILD.bazel +++ b/imports/kotlin/kotlinx/coroutines/test/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "test", - actual = "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_test", + actual = "@common_jvm_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_test", ) diff --git a/imports/kotlin/org/mockito/kotlin/BUILD.bazel b/imports/kotlin/org/mockito/kotlin/BUILD.bazel index 785a7a34c..59f16cc32 100644 --- a/imports/kotlin/org/mockito/kotlin/BUILD.bazel +++ b/imports/kotlin/org/mockito/kotlin/BUILD.bazel @@ -2,5 +2,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "kotlin", - actual = "@maven//:org_mockito_kotlin_mockito_kotlin", + actual = "@common_jvm_maven//:org_mockito_kotlin_mockito_kotlin", ) diff --git a/src/main/kotlin/org/wfanet/measurement/aws/common/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/aws/common/BUILD.bazel index 25a6bd195..9d8de26b1 100644 --- a/src/main/kotlin/org/wfanet/measurement/aws/common/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/aws/common/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/aws/postgres/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/aws/postgres/BUILD.bazel index d4020e99a..8c8c8ee9b 100644 --- a/src/main/kotlin/org/wfanet/measurement/aws/postgres/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/aws/postgres/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) @@ -32,6 +32,7 @@ kt_jvm_library( ], deps = [ "//imports/java/com/google/gson", + "//imports/java/software/amazon/awssdk/auth", "//imports/java/software/amazon/awssdk/services/secretsmanager", ], ) diff --git a/src/main/kotlin/org/wfanet/measurement/aws/postgres/tools/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/aws/postgres/tools/BUILD.bazel index 96cdf47f9..73e25b6b4 100644 --- a/src/main/kotlin/org/wfanet/measurement/aws/postgres/tools/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/aws/postgres/tools/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/aws/s3/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/aws/s3/BUILD.bazel index 679bd9ace..7d4944236 100644 --- a/src/main/kotlin/org/wfanet/measurement/aws/s3/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/aws/s3/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) @@ -10,7 +10,6 @@ kt_jvm_library( "//imports/java/software/amazon/awssdk/services/s3", "//imports/kotlin/com/google/protobuf/kotlin", "//imports/kotlin/kotlinx/coroutines:core", - "//imports/kotlin/kotlinx/coroutines:jdk8", "//imports/kotlin/kotlinx/coroutines/reactive", "//src/main/kotlin/org/wfanet/measurement/aws/common:region_converter", "//src/main/kotlin/org/wfanet/measurement/common/crypto:hashing", diff --git a/src/main/kotlin/org/wfanet/measurement/common/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/BUILD.bazel index 54da33b1c..6de79eeab 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) @@ -14,8 +14,8 @@ kt_jvm_library( "//imports/java/org/jetbrains/annotations", "//imports/java/picocli", "//imports/kotlin/com/google/protobuf/kotlin", + "//imports/kotlin/com/google/type:date_kt_jvm_proto", + "//imports/kotlin/com/google/type:interval_kt_jvm_proto", "//imports/kotlin/kotlinx/coroutines:core", - "//src/main/proto/google/type:interval_kt_jvm_proto", - "@com_google_googleapis//google/type:type_java_proto", ], ) diff --git a/src/main/kotlin/org/wfanet/measurement/common/Runfiles.kt b/src/main/kotlin/org/wfanet/measurement/common/Runfiles.kt index 9551140ee..7b895c253 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/Runfiles.kt +++ b/src/main/kotlin/org/wfanet/measurement/common/Runfiles.kt @@ -18,7 +18,17 @@ import com.google.devtools.build.runfiles.Runfiles import java.nio.file.Path import java.nio.file.Paths -private val runfiles: Runfiles by lazy { Runfiles.create() } +/** + * Returns the runtime [Path] for the given runfiles-root-relative [Path], or null if it cannot be + * found. + * + * Note that this may return a non-null value even if the path doesn't exist. + * + * @param runfilesRelativePath path relative to the Bazel runfiles root + */ +fun Runfiles.getRuntimePath(runfilesRelativePath: Path): Path? { + return rlocation(runfilesRelativePath.normalize().toString())?.let { Paths.get(it) } +} /** * Returns the runtime [Path] for the given runfiles-root-relative [Path], or null if it cannot be @@ -28,8 +38,12 @@ private val runfiles: Runfiles by lazy { Runfiles.create() } * * @param runfilesRelativePath path relative to the Bazel runfiles root */ +@Suppress("DeprecatedCallableAddReplaceWith") +@Deprecated( + "May not work correctly with Bzlmod. Use Runfiles.getRuntimePath with Runfiles.preload()" +) fun getRuntimePath(runfilesRelativePath: Path): Path? { - return runfiles.rlocation(runfilesRelativePath.normalize().toString())?.let { Paths.get(it) } + return Runfiles.create().getRuntimePath(runfilesRelativePath) } /** diff --git a/src/main/kotlin/org/wfanet/measurement/common/crypto/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/crypto/BUILD.bazel index 3c4f0c86e..a6bacb6ee 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/crypto/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/crypto/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/crypto/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/crypto/testing/BUILD.bazel index 1c08aad45..90829e476 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/crypto/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/crypto/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package( default_testonly = True, diff --git a/src/main/kotlin/org/wfanet/measurement/common/crypto/tink/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/crypto/tink/BUILD.bazel index 398ccbf96..78e623c8a 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/crypto/tink/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/crypto/tink/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/crypto/tink/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/crypto/tink/testing/BUILD.bazel index e332aa2d1..46e0fcad7 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/crypto/tink/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/crypto/tink/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package( default_testonly = True, diff --git a/src/main/kotlin/org/wfanet/measurement/common/db/liquibase/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/db/liquibase/BUILD.bazel index 4bf17bf3d..71c487a6f 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/db/liquibase/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/db/liquibase/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/db/liquibase/tools/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/db/liquibase/tools/BUILD.bazel index 591eb0954..d805f677f 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/db/liquibase/tools/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/db/liquibase/tools/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/db/postgres/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/db/postgres/BUILD.bazel index 2aa5a1116..5f9cb8083 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/db/postgres/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/db/postgres/BUILD.bazel @@ -1,6 +1,6 @@ # Database specifics for Postgres. -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/db/postgres/tools/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/db/postgres/tools/BUILD.bazel index 79ac8be60..e4a169307 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/db/postgres/tools/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/db/postgres/tools/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/BUILD.bazel index e45ef5245..587114fb6 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/BUILD.bazel index 5d2589c25..7c35bd02e 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/testing/BUILD.bazel index 9c4f9fd87..2d87150bb 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package( default_testonly = True, diff --git a/src/main/kotlin/org/wfanet/measurement/common/graphviz/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/graphviz/BUILD.bazel index 1fe386189..a34e264fb 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/graphviz/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/graphviz/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/grpc/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/grpc/BUILD.bazel index 1f2494099..1909e010b 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/grpc/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/grpc/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/grpc/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/grpc/testing/BUILD.bazel index 1c3b22af1..4795a2e1b 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/grpc/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/grpc/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package( default_testonly = True, @@ -11,6 +11,7 @@ kt_jvm_library( deps = [ "//imports/java/io/grpc:api", "//imports/java/io/grpc:core", + "//imports/java/io/grpc/inprocess", "//imports/java/io/grpc/testing", "//imports/java/org/junit", "//imports/kotlin/io/grpc/kotlin:stub", diff --git a/src/main/kotlin/org/wfanet/measurement/common/identity/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/identity/BUILD.bazel index fb27efd64..4961a57af 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/identity/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/identity/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/identity/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/identity/testing/BUILD.bazel index d2d789c24..be914fb0d 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/identity/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/identity/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/openid/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/openid/BUILD.bazel index 1156f803c..685ec1daa 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/openid/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/openid/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/riegeli/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/riegeli/BUILD.bazel index 71e786335..b76220b3d 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/riegeli/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/riegeli/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/common/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/testing/BUILD.bazel index 5b4a0ef30..463a9109f 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) @@ -14,7 +14,6 @@ kt_jvm_library( "//imports/java/org/junit", "//imports/java/org/mockito", "//imports/kotlin/kotlinx/coroutines:core", - "//imports/kotlin/kotlinx/coroutines:jdk8", "//imports/kotlin/org/mockito/kotlin", "//src/main/kotlin/org/wfanet/measurement/common", "//src/main/kotlin/org/wfanet/measurement/common/grpc", diff --git a/src/main/kotlin/org/wfanet/measurement/common/throttler/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/throttler/BUILD.bazel index 79be835a0..e1de85142 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/throttler/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/throttler/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) @@ -8,6 +8,5 @@ kt_jvm_library( deps = [ "//imports/java/picocli", "//imports/kotlin/kotlinx/coroutines:core", - "//imports/kotlin/kotlinx/coroutines:jdk8", ], ) diff --git a/src/main/kotlin/org/wfanet/measurement/common/throttler/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/common/throttler/testing/BUILD.bazel index cfe0b8ee4..099372286 100644 --- a/src/main/kotlin/org/wfanet/measurement/common/throttler/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/common/throttler/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/common/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/gcloud/common/BUILD.bazel index 58123ef7b..13455c3f1 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/common/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/common/BUILD.bazel @@ -1,6 +1,6 @@ # Common functionality for Google Cloud (gcloud) APIs. -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) @@ -11,7 +11,7 @@ kt_jvm_library( "//imports/java/com/google/api/core", "//imports/java/com/google/cloud:core", "//imports/java/com/google/protobuf", - "//imports/java/com/google/type:type_java_proto", + "//imports/kotlin/com/google/type:date_kt_jvm_proto", "//imports/kotlin/kotlinx/coroutines:core", "//imports/kotlin/kotlinx/coroutines/guava", ], diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/gcs/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/gcloud/gcs/BUILD.bazel index edda91e30..7edf32653 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/gcs/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/gcs/BUILD.bazel @@ -1,6 +1,6 @@ # Blob/object storage specifics for Google Cloud Storage (GCS). -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/logging/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/gcloud/logging/BUILD.bazel index 4afac4dc5..87f2c0649 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/logging/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/logging/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/postgres/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/gcloud/postgres/BUILD.bazel index 44439c3d5..82678eb64 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/postgres/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/postgres/BUILD.bazel @@ -1,6 +1,6 @@ # Database specifics for Postgres. -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/postgres/tools/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/gcloud/postgres/tools/BUILD.bazel index 9e1177b7f..ee963230d 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/postgres/tools/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/postgres/tools/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/BUILD.bazel index cd8d79509..37f95f5fa 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/BUILD.bazel @@ -1,6 +1,6 @@ # Database specifics for Google Cloud Spanner. -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) @@ -21,7 +21,6 @@ kt_jvm_library( ":flags", "//imports/java/com/google/cloud/spanner", "//imports/kotlin/kotlinx/coroutines:core", - "//imports/kotlin/kotlinx/coroutines:jdk8", "//src/main/kotlin/org/wfanet/measurement/common", "//src/main/kotlin/org/wfanet/measurement/common/identity", "//src/main/kotlin/org/wfanet/measurement/gcloud/common", diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/BUILD.bazel index c85a89884..c0c5266fc 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package( default_testonly = True, diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/macros.bzl b/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/macros.bzl index f81610da7..b9014b25f 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/macros.bzl +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/testing/macros.bzl @@ -14,7 +14,7 @@ """Macros for Spanner test targets.""" -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") def spanner_emulator_test(name, data = [], **kwargs): kt_jvm_test( diff --git a/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/tools/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/tools/BUILD.bazel index 661b54bd2..e53707b70 100644 --- a/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/tools/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/gcloud/spanner/tools/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/storage/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/storage/BUILD.bazel index ba0589096..b1be28138 100644 --- a/src/main/kotlin/org/wfanet/measurement/storage/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/storage/BUILD.bazel @@ -1,6 +1,6 @@ # Blob/object storage. -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/storage/filesystem/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/storage/filesystem/BUILD.bazel index 86ecab978..ac7ae1ac6 100644 --- a/src/main/kotlin/org/wfanet/measurement/storage/filesystem/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/storage/filesystem/BUILD.bazel @@ -1,5 +1,5 @@ load("@rules_java//java:defs.bzl", "java_binary") -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") load("//build/rules_oci:defs.bzl", "java_image") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/storage/forwarded/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/storage/forwarded/BUILD.bazel index 6cbd7f19a..12d28fb6a 100644 --- a/src/main/kotlin/org/wfanet/measurement/storage/forwarded/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/storage/forwarded/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package(default_visibility = ["//visibility:public"]) diff --git a/src/main/kotlin/org/wfanet/measurement/storage/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/storage/testing/BUILD.bazel index e7ace31d1..66aa4cdf6 100644 --- a/src/main/kotlin/org/wfanet/measurement/storage/testing/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/storage/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("//build/rules_kotlin:defs.bzl", "kt_jvm_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_library") package( default_testonly = True, diff --git a/src/main/proto/google/type/BUILD.bazel b/src/main/proto/google/type/BUILD.bazel deleted file mode 100644 index e241c3eed..000000000 --- a/src/main/proto/google/type/BUILD.bazel +++ /dev/null @@ -1,27 +0,0 @@ -load("//build/kt_jvm_proto:defs.bzl", "kt_jvm_proto_library") - -package(default_visibility = ["//visibility:public"]) - -kt_jvm_proto_library( - name = "dayofweek_kt_jvm_proto", - srcs = ["@com_google_googleapis//google/type:dayofweek_proto"], - deps = ["@com_google_googleapis//google/type:type_java_proto"], -) - -kt_jvm_proto_library( - name = "date_kt_jvm_proto", - srcs = ["@com_google_googleapis//google/type:date_proto"], - deps = ["@com_google_googleapis//google/type:type_java_proto"], -) - -kt_jvm_proto_library( - name = "latlng_kt_jvm_proto", - srcs = ["@com_google_googleapis//google/type:latlng_proto"], - deps = ["@com_google_googleapis//google/type:type_java_proto"], -) - -kt_jvm_proto_library( - name = "interval_kt_jvm_proto", - srcs = ["@com_google_googleapis//google/type:interval_proto"], - deps = ["@com_google_googleapis//google/type:type_java_proto"], -) diff --git a/src/main/proto/wfa/measurement/common/testing/BUILD.bazel b/src/main/proto/wfa/measurement/common/testing/BUILD.bazel index e6580ea94..16d4e6e62 100644 --- a/src/main/proto/wfa/measurement/common/testing/BUILD.bazel +++ b/src/main/proto/wfa/measurement/common/testing/BUILD.bazel @@ -1,6 +1,5 @@ load("@rules_proto//proto:defs.bzl", "proto_library") -load("@rules_java//java:defs.bzl", "java_proto_library") -load("@wfa_common_jvm//build/kt_jvm_proto:defs.bzl", "kt_jvm_proto_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_proto_library") package( default_testonly = True, @@ -15,6 +14,11 @@ proto_library( strip_import_prefix = IMPORT_PREFIX, ) +kt_jvm_proto_library( + name = "simple_kt_jvm_proto", + deps = [":simple_proto"], +) + proto_library( name = "depends_on_simple_proto", srcs = ["depends_on_simple.proto"], @@ -25,13 +29,7 @@ proto_library( ], ) -java_proto_library( - name = "depends_on_simple_java_proto", - deps = [":depends_on_simple_proto"], -) - kt_jvm_proto_library( name = "depends_on_simple_kt_jvm_proto", - srcs = [":depends_on_simple_proto"], - deps = [":depends_on_simple_java_proto"], + deps = [":depends_on_simple_proto"], ) diff --git a/src/main/proto/wfa/measurement/internal/testing/BUILD.bazel b/src/main/proto/wfa/measurement/internal/testing/BUILD.bazel index 2a7091de8..c183d8c6d 100644 --- a/src/main/proto/wfa/measurement/internal/testing/BUILD.bazel +++ b/src/main/proto/wfa/measurement/internal/testing/BUILD.bazel @@ -1,15 +1,14 @@ load("@rules_proto//proto:defs.bzl", "proto_library") -load("//build:macros.bzl", "kt_jvm_grpc_proto_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_grpc_proto_library") package(default_visibility = ["//visibility:public"]) proto_library( name = "forwarded_storage_service_proto", srcs = ["forwarded_storage_service.proto"], - strip_import_prefix = "/src/main/proto", ) kt_jvm_grpc_proto_library( name = "forwarded_storage_service_kt_jvm_grpc_proto", - srcs = [":forwarded_storage_service_proto"], + deps = [":forwarded_storage_service_proto"], ) diff --git a/src/main/proto/wfa/measurement/testing/riegeli/BUILD.bazel b/src/main/proto/wfa/measurement/testing/riegeli/BUILD.bazel index d2eb1b85a..83195b6f5 100644 --- a/src/main/proto/wfa/measurement/testing/riegeli/BUILD.bazel +++ b/src/main/proto/wfa/measurement/testing/riegeli/BUILD.bazel @@ -1,6 +1,6 @@ -load("//build/kt_jvm_proto:defs.bzl", "kt_jvm_proto_library") load("@rules_java//java:defs.bzl", "java_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_proto_library") package( default_testonly = True, @@ -10,7 +10,6 @@ package( proto_library( name = "simple_message_proto", srcs = ["simple_message.proto"], - strip_import_prefix = "/src/main/proto", ) java_proto_library( @@ -20,6 +19,5 @@ java_proto_library( kt_jvm_proto_library( name = "simple_message_kt_jvm_proto", - srcs = [":simple_message_proto"], - deps = [":simple_message_java_proto"], + deps = [":simple_message_proto"], ) diff --git a/src/test/kotlin/org/wfanet/bazel/BUILD.bazel b/src/test/kotlin/org/wfanet/bazel/BUILD.bazel index afcac3f80..8592667ec 100644 --- a/src/test/kotlin/org/wfanet/bazel/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/bazel/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "KtJvmProtoLibraryTest", diff --git a/src/test/kotlin/org/wfanet/measurement/aws/s3/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/aws/s3/BUILD.bazel index 634b1258c..494f98491 100644 --- a/src/test/kotlin/org/wfanet/measurement/aws/s3/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/aws/s3/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "S3StorageClientTest", @@ -7,6 +7,7 @@ kt_jvm_test( deps = [ "//imports/java/com/adobe/testing/s3mock/junit4", "//imports/java/org/junit", + "//imports/java/software/amazon/awssdk/auth", "//src/main/kotlin/org/wfanet/measurement/aws/s3", "//src/main/kotlin/org/wfanet/measurement/storage/testing", ], diff --git a/src/test/kotlin/org/wfanet/measurement/common/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/BUILD.bazel index 981b6ef14..ee7767839 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "BytesTest", @@ -91,8 +91,8 @@ kt_jvm_test( "//imports/java/com/google/common/truth/extensions/proto", "//imports/java/com/google/protobuf", "//imports/java/org/junit", + "//imports/kotlin/com/google/type:date_kt_jvm_proto", "//src/main/kotlin/org/wfanet/measurement/common", - "@com_google_googleapis//google/type:type_java_proto", ], ) diff --git a/src/test/kotlin/org/wfanet/measurement/common/crypto/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/crypto/BUILD.bazel index 817ee9abd..d21194b27 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/crypto/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/crypto/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "HashingTest", diff --git a/src/test/kotlin/org/wfanet/measurement/common/crypto/tink/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/crypto/tink/BUILD.bazel index a00ccdb44..fcc9de6b8 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/crypto/tink/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/crypto/tink/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "KeyHandleTest", diff --git a/src/test/kotlin/org/wfanet/measurement/common/crypto/tink/testing/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/crypto/tink/testing/BUILD.bazel index 9ad309af4..f9e372489 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/crypto/tink/testing/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/crypto/tink/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") package(default_testonly = True) diff --git a/src/test/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/BUILD.bazel index 5b2b8b21c..e4a81f465 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "PostgresDatabaseClientTest", @@ -13,10 +13,10 @@ kt_jvm_test( deps = [ "//imports/java/com/google/common/truth", "//imports/java/org/junit", + "//imports/kotlin/com/google/type:dayofweek_kt_jvm_proto", + "//imports/kotlin/com/google/type:latlng_kt_jvm_proto", "//src/main/kotlin/org/wfanet/measurement/common", "//src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres", "//src/main/kotlin/org/wfanet/measurement/common/db/r2dbc/postgres/testing:database_provider", - "//src/main/proto/google/type:dayofweek_kt_jvm_proto", - "//src/main/proto/google/type:latlng_kt_jvm_proto", ], ) diff --git a/src/test/kotlin/org/wfanet/measurement/common/graphviz/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/graphviz/BUILD.bazel index c96b0f63d..3a6054177 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/graphviz/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/graphviz/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "DotTest", diff --git a/src/test/kotlin/org/wfanet/measurement/common/grpc/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/grpc/BUILD.bazel index b7c4e7eba..7ec81d3ad 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/grpc/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/grpc/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "ChannelShutdownHookTest", @@ -32,7 +32,7 @@ kt_jvm_test( "//imports/java/io/grpc/testing", "//imports/java/io/netty/handler", "//imports/java/org/junit", - "//imports/kotlin/io/grpc/health/v1:health_kt_jvm_grpc", + "//imports/kotlin/io/grpc/health/v1:health_kt_jvm_grpc_proto", "//imports/kotlin/kotlin/test", "//imports/kotlin/kotlinx/coroutines:core", "//src/main/kotlin/org/wfanet/measurement/common/crypto:signing_certs", diff --git a/src/test/kotlin/org/wfanet/measurement/common/identity/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/identity/BUILD.bazel index aa78efdd4..afe6fefcc 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/identity/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/identity/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "IdentifiersTest", diff --git a/src/test/kotlin/org/wfanet/measurement/common/riegeli/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/riegeli/BUILD.bazel index fc3f56964..09bc8f562 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/riegeli/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/riegeli/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "RiegeliTest", diff --git a/src/test/kotlin/org/wfanet/measurement/common/testing/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/testing/BUILD.bazel index eff5570dd..c783205a6 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/testing/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "TestClockWithNamedInstantsTest", diff --git a/src/test/kotlin/org/wfanet/measurement/common/throttler/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/common/throttler/BUILD.bazel index 94c3d9c5c..740c84a5f 100644 --- a/src/test/kotlin/org/wfanet/measurement/common/throttler/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/common/throttler/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "AdaptiveThrottlerTest", @@ -24,7 +24,6 @@ kt_jvm_test( "//imports/java/org/junit", "//imports/kotlin/kotlin/test", "//imports/kotlin/kotlinx/coroutines:core", - "//imports/kotlin/kotlinx/coroutines:jdk8", "//imports/kotlin/kotlinx/coroutines/test", "//src/main/kotlin/org/wfanet/measurement/common/throttler", ], diff --git a/src/test/kotlin/org/wfanet/measurement/gcloud/gcs/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/gcloud/gcs/BUILD.bazel index ff35d1142..0dc1be425 100644 --- a/src/test/kotlin/org/wfanet/measurement/gcloud/gcs/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/gcloud/gcs/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "GcsStorageClientTest", diff --git a/src/test/kotlin/org/wfanet/measurement/gcloud/logging/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/gcloud/logging/BUILD.bazel index 498d6fe7c..68a9d2cb4 100644 --- a/src/test/kotlin/org/wfanet/measurement/gcloud/logging/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/gcloud/logging/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") package(default_testonly = True) diff --git a/src/test/kotlin/org/wfanet/measurement/gcloud/spanner/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/gcloud/spanner/BUILD.bazel index a1850abb5..43ac96c99 100644 --- a/src/test/kotlin/org/wfanet/measurement/gcloud/spanner/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/gcloud/spanner/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "SpannerStructsTest", diff --git a/src/test/kotlin/org/wfanet/measurement/storage/filesystem/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/storage/filesystem/BUILD.bazel index d16ae62f7..d78f5ba84 100644 --- a/src/test/kotlin/org/wfanet/measurement/storage/filesystem/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/storage/filesystem/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "FileSystemStorageClientTest", diff --git a/src/test/kotlin/org/wfanet/measurement/storage/testing/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/storage/testing/BUILD.bazel index c3a3fc2a0..d21d443b7 100644 --- a/src/test/kotlin/org/wfanet/measurement/storage/testing/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/storage/testing/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@wfa_rules_kotlin_jvm//kotlin:defs.bzl", "kt_jvm_test") kt_jvm_test( name = "InMemoryStorageClientTest", diff --git a/src/test/proto/wfa/measurement/common/BUILD.bazel b/src/test/proto/wfa/measurement/common/BUILD.bazel index 022630321..4de3d38b7 100644 --- a/src/test/proto/wfa/measurement/common/BUILD.bazel +++ b/src/test/proto/wfa/measurement/common/BUILD.bazel @@ -1,7 +1,10 @@ -load("//build/kt_jvm_proto:defs.bzl", "kt_jvm_proto_library") -load("//build:macros.bzl", "kt_jvm_grpc_proto_library") load("@rules_java//java:defs.bzl", "java_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load( + "@wfa_rules_kotlin_jvm//kotlin:defs.bzl", + "kt_jvm_grpc_proto_library", + "kt_jvm_proto_library", +) package( default_testonly = True, @@ -21,8 +24,7 @@ java_proto_library( kt_jvm_proto_library( name = "fake_message_kt_jvm_proto", - srcs = [":fake_message_proto"], - deps = [":fake_message_java_proto"], + deps = [":fake_message_proto"], ) proto_library( @@ -33,5 +35,5 @@ proto_library( kt_jvm_grpc_proto_library( name = "fake_service_kt_jvm_grpc_proto", - srcs = [":fake_service_proto"], + deps = [":fake_service_proto"], )