2018-10-17 21:01:38 +00:00
|
|
|
workspace(name = "com_google_googleapis")
|
|
|
|
|
|
2019-02-07 00:00:55 +00:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
2019-05-21 23:06:55 +00:00
|
|
|
# Common
|
2019-02-07 00:00:55 +00:00
|
|
|
##############################################################################
|
2019-03-11 17:39:08 +00:00
|
|
|
|
2019-05-21 23:06:55 +00:00
|
|
|
load("//:repository_rules.bzl", "switched_rules_by_language")
|
|
|
|
|
|
|
|
|
|
switched_rules_by_language(
|
|
|
|
|
name = "com_google_googleapis_imports",
|
2019-05-28 15:49:29 +00:00
|
|
|
cc = True,
|
2019-05-21 23:06:55 +00:00
|
|
|
gapic = True,
|
|
|
|
|
go = True,
|
2019-05-28 15:49:29 +00:00
|
|
|
grpc = True,
|
2019-05-21 23:06:55 +00:00
|
|
|
java = True,
|
2019-06-19 17:44:24 +00:00
|
|
|
nodejs = True,
|
2019-06-07 20:31:01 +00:00
|
|
|
php = True,
|
2019-08-15 22:17:30 +00:00
|
|
|
ruby = True,
|
2019-08-27 23:46:42 +00:00
|
|
|
csharp = True,
|
|
|
|
|
)
|
|
|
|
|
|
2019-08-29 22:48:07 +00:00
|
|
|
# Protobuf depends on very old version of bazel_skylib (forward compatible with the new one).
|
|
|
|
|
# Importing older version of bazel_skylib first (this is one of the things that protobuf_deps() call
|
|
|
|
|
# below will do) breaks the grpc repositories, so importing the proper version explicitly before
|
|
|
|
|
# everything else.
|
|
|
|
|
http_archive(
|
|
|
|
|
name = "bazel_skylib",
|
|
|
|
|
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz"],
|
|
|
|
|
)
|
|
|
|
|
|
2019-08-27 23:46:42 +00:00
|
|
|
http_archive(
|
|
|
|
|
name = "com_google_protobuf",
|
|
|
|
|
strip_prefix = "protobuf-c60aaf79e63b911b2c04c04e1eacb4f3c36ef790", # this is 3.9.1 with fixes
|
|
|
|
|
urls = ["https://github.com/protocolbuffers/protobuf/archive/c60aaf79e63b911b2c04c04e1eacb4f3c36ef790.zip"],
|
2019-05-21 23:06:55 +00:00
|
|
|
)
|
|
|
|
|
|
2019-08-29 22:48:07 +00:00
|
|
|
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
|
|
|
|
|
|
|
|
|
protobuf_deps()
|
|
|
|
|
|
2019-05-21 23:06:55 +00:00
|
|
|
# Note gapic-generator contains java-specific and common code, that is why it is imported in common
|
|
|
|
|
# section
|
2019-02-07 00:00:55 +00:00
|
|
|
http_archive(
|
2019-03-11 17:39:08 +00:00
|
|
|
name = "com_google_api_codegen",
|
2019-08-29 22:48:07 +00:00
|
|
|
strip_prefix = "gapic-generator-5aa30f3d6850c8ebc1092d17ef471aea27a81242",
|
|
|
|
|
urls = ["https://github.com/googleapis/gapic-generator/archive/5aa30f3d6850c8ebc1092d17ef471aea27a81242.zip"],
|
2019-08-27 23:46:42 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
# C++
|
|
|
|
|
##############################################################################
|
|
|
|
|
# C++ must go before everything else, since the key dependencies (protobuf and gRPC)
|
|
|
|
|
# are C++ repositories and they have the highest chance to have the correct versions of the
|
|
|
|
|
# transitive dependencies (for those dependencies which are shared by many other repositories
|
|
|
|
|
# imported in this workspace).
|
|
|
|
|
#
|
|
|
|
|
# Note, even though protobuf and gRPC are mostly written in C++, they are used to generate stuff
|
|
|
|
|
# for most of the other languages as well, so they can be considered as the core cross-language
|
|
|
|
|
# dependencies.
|
|
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
|
name = "com_github_grpc_grpc",
|
2019-08-29 22:48:07 +00:00
|
|
|
strip_prefix = "grpc-0542eb59d9b7a75f16edfd9e3010c8d7d399626d", # this is 1.23.0 with fixes
|
|
|
|
|
urls = ["https://github.com/grpc/grpc/archive/0542eb59d9b7a75f16edfd9e3010c8d7d399626d.zip"],
|
2019-08-27 23:46:42 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
|
|
|
|
|
|
|
|
|
|
grpc_deps()
|
|
|
|
|
|
|
|
|
|
load("@upb//bazel:repository_defs.bzl", "bazel_version_repository")
|
|
|
|
|
bazel_version_repository(
|
|
|
|
|
name = "bazel_version",
|
2018-10-17 21:01:38 +00:00
|
|
|
)
|
|
|
|
|
|
2019-08-27 23:46:42 +00:00
|
|
|
load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies")
|
|
|
|
|
apple_rules_dependencies()
|
|
|
|
|
|
|
|
|
|
load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies")
|
|
|
|
|
apple_support_dependencies()
|
|
|
|
|
|
2019-05-21 23:06:55 +00:00
|
|
|
##############################################################################
|
|
|
|
|
# Java
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
# java_gapic artifacts runtime dependencies (gax-java)
|
2019-05-23 23:59:39 +00:00
|
|
|
#
|
|
|
|
|
# Keeping it here to see how this goes (what will be more maintainable: direct import of gax or via
|
|
|
|
|
# gapic-generator).
|
|
|
|
|
#
|
|
|
|
|
#load("@com_google_api_codegen//rules_gapic/java:java_gapic_repositories.bzl", "java_gapic_repositories")
|
|
|
|
|
#
|
|
|
|
|
#java_gapic_repositories()
|
2018-10-17 21:01:38 +00:00
|
|
|
|
2019-05-23 23:59:39 +00:00
|
|
|
http_archive(
|
|
|
|
|
name = "com_google_api_gax_java",
|
2019-08-27 23:46:42 +00:00
|
|
|
strip_prefix = "gax-java-425d9111bc8a2e2c950e60b7e925de83d00b9da9",
|
|
|
|
|
urls = ["https://github.com/googleapis/gax-java/archive/425d9111bc8a2e2c950e60b7e925de83d00b9da9.zip"],
|
2019-05-23 23:59:39 +00:00
|
|
|
)
|
2018-10-17 21:01:38 +00:00
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
load("@com_google_api_gax_java//:repository_rules.bzl", "com_google_api_gax_java_properties")
|
2018-10-17 21:01:38 +00:00
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
com_google_api_gax_java_properties(
|
|
|
|
|
name = "com_google_api_gax_java_properties",
|
|
|
|
|
file = "@com_google_api_gax_java//:dependencies.properties",
|
2018-10-17 21:01:38 +00:00
|
|
|
)
|
|
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
load("@com_google_api_gax_java//:repositories.bzl", "com_google_api_gax_java_repositories")
|
2018-10-17 21:01:38 +00:00
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
com_google_api_gax_java_repositories()
|
2018-10-17 21:01:38 +00:00
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
# gapic-generator transitive
|
|
|
|
|
# (goes AFTER java-gax, since both java gax and gapic-generator are written in java and may conflict)
|
|
|
|
|
load("@com_google_api_codegen//:repository_rules.bzl", "com_google_api_codegen_properties")
|
2018-10-17 21:01:38 +00:00
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
com_google_api_codegen_properties(
|
|
|
|
|
name = "com_google_api_codegen_properties",
|
|
|
|
|
file = "@com_google_api_codegen//:dependencies.properties",
|
2018-10-17 21:01:38 +00:00
|
|
|
)
|
|
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
load("@com_google_api_codegen//:repositories.bzl", "com_google_api_codegen_repositories")
|
2018-10-17 21:01:38 +00:00
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
com_google_api_codegen_repositories()
|
2018-10-17 21:01:38 +00:00
|
|
|
|
2019-08-07 23:44:00 +00:00
|
|
|
http_archive(
|
|
|
|
|
name = "com_google_protoc_java_resource_names_plugin",
|
|
|
|
|
strip_prefix = "protoc-java-resource-names-plugin-86949f7d0f25546499acceb12c9c1a5741c71617",
|
|
|
|
|
urls = ["https://github.com/googleapis/protoc-java-resource-names-plugin/archive/86949f7d0f25546499acceb12c9c1a5741c71617.zip"],
|
|
|
|
|
)
|
|
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
# protoc-java-resource-names-plugin (loaded in com_google_api_codegen_repositories())
|
|
|
|
|
# (required to support resource names feature in gapic generator)
|
2018-10-17 21:01:38 +00:00
|
|
|
load(
|
|
|
|
|
"@com_google_protoc_java_resource_names_plugin//:repositories.bzl",
|
|
|
|
|
"com_google_protoc_java_resource_names_plugin_repositories",
|
|
|
|
|
)
|
|
|
|
|
|
2019-08-07 23:44:00 +00:00
|
|
|
com_google_protoc_java_resource_names_plugin_repositories()
|
2019-02-07 00:00:55 +00:00
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
# Go
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
# rules_go (support Golang under bazel)
|
2019-02-07 00:00:55 +00:00
|
|
|
http_archive(
|
|
|
|
|
name = "io_bazel_rules_go",
|
2019-05-23 23:59:39 +00:00
|
|
|
sha256 = "a82a352bffae6bee4e95f68a8d80a70e87f42c4741e6a448bec11998fcc82329",
|
2019-05-28 15:49:29 +00:00
|
|
|
url = "https://github.com/bazelbuild/rules_go/releases/download/0.18.5/rules_go-0.18.5.tar.gz",
|
2019-02-07 00:00:55 +00:00
|
|
|
)
|
|
|
|
|
|
2019-05-23 23:59:39 +00:00
|
|
|
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
|
2019-02-07 00:00:55 +00:00
|
|
|
|
|
|
|
|
go_rules_dependencies()
|
|
|
|
|
|
|
|
|
|
go_register_toolchains()
|
|
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
# bazel-gazelle (support Golang under bazel)
|
2019-02-07 00:00:55 +00:00
|
|
|
http_archive(
|
|
|
|
|
name = "bazel_gazelle",
|
2019-05-23 23:59:39 +00:00
|
|
|
strip_prefix = "bazel-gazelle-0.17.0",
|
|
|
|
|
urls = ["https://github.com/bazelbuild/bazel-gazelle/archive/0.17.0.zip"],
|
2019-02-07 00:00:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
|
|
|
|
|
|
|
|
|
|
gazelle_dependencies()
|
|
|
|
|
|
2019-03-11 17:39:08 +00:00
|
|
|
# go_gapic artifacts runtime dependencies (gax-go)
|
2019-02-07 00:00:55 +00:00
|
|
|
load("@com_google_api_codegen//rules_gapic/go:go_gapic_repositories.bzl", "go_gapic_repositories")
|
|
|
|
|
|
|
|
|
|
go_gapic_repositories()
|
2019-05-24 20:07:56 +00:00
|
|
|
|
2019-06-07 20:31:01 +00:00
|
|
|
##############################################################################
|
|
|
|
|
# PHP
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
|
|
load("@com_google_api_codegen//rules_gapic/php:php_gapic_repositories.bzl", "php", "php_gapic_repositories")
|
|
|
|
|
|
|
|
|
|
php(
|
|
|
|
|
name = "php",
|
|
|
|
|
version = "7.1.30",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
php_gapic_repositories()
|