370 lines
9.1 KiB
Python
370 lines
9.1 KiB
Python
# JTS Framework WORKSPACE.
|
|
|
|
workspace(name = "jts")
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository", "git_repository")
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
# In Bazel 2.0, Maven rules provided via new rules_jvm_external.
|
|
RULES_JVM_EXTERNAL_TAG = "3.1"
|
|
RULES_JVM_EXTERNAL_SHA = "e246373de2353f3d34d35814947aa8b7d0dd1a58c2f7a6c41cfeaff3007c2d14"
|
|
http_archive(
|
|
name = "rules_jvm_external",
|
|
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
|
|
sha256 = RULES_JVM_EXTERNAL_SHA,
|
|
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
|
|
)
|
|
load("@rules_jvm_external//:defs.bzl", "maven_install")
|
|
|
|
# Google Guice.
|
|
maven_install(
|
|
name = "google_guice",
|
|
artifacts = ["com.google.inject:guice:4.2.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Appache core framework.
|
|
maven_install(
|
|
name = "apache_httpcore",
|
|
artifacts = ["org.apache.httpcomponents:httpcore:4.4.10"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Google APIs client library
|
|
maven_install(
|
|
name = "google_api",
|
|
artifacts = ["com.google.api-client:google-api-client:1.30.2"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Google HTTP Client
|
|
maven_install(
|
|
name = "google_http_client",
|
|
artifacts = ["com.google.http-client:google-http-client:1.30.2"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Google HTTP Client Jackson2 Extensions
|
|
maven_install(
|
|
name = "jackson2",
|
|
artifacts = ["com.google.http-client:google-http-client-jackson2:1.31.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
maven_install(
|
|
name = "jackson_core",
|
|
artifacts = ["com.fasterxml.jackson.core:jackson-core:2.10.0.pr2"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Google Oauth2 API
|
|
maven_install(
|
|
name = "google_oauth2",
|
|
artifacts = ["com.google.oauth-client:google-oauth-client:1.30.1"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Google Java common framework.
|
|
maven_install(
|
|
name = "google_guava",
|
|
artifacts = ["com.google.guava:guava:25.1-jre"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# GRPC
|
|
git_repository(
|
|
name = "io_grpc_grpc_java",
|
|
remote = "https://github.com/grpc/grpc-java.git",
|
|
tag = "v1.23.0",
|
|
)
|
|
|
|
# GRPC Core
|
|
maven_install(
|
|
name = "grpc_core",
|
|
artifacts = ["io.grpc:grpc-core:1.23.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# GRPC Netty
|
|
maven_install(
|
|
name = "grpc_netty",
|
|
artifacts = ["io.grpc:grpc-netty:1.23.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
maven_install(
|
|
name = "grpc_netty_all",
|
|
artifacts = ["io.netty:netty-all:4.1.41.Final"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# GRPC Stub
|
|
maven_install(
|
|
name = "grpc_stub",
|
|
artifacts = ["io.grpc:grpc-stub:1.23.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# GRPC Contenxt
|
|
maven_install(
|
|
name = "grpc_context",
|
|
artifacts = ["io.grpc:grpc-context:1.18.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# GSON
|
|
maven_install(
|
|
name = "gson",
|
|
artifacts = ["com.google.code.gson:gson:2.8.6"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Netty TcNative (for GRPC)
|
|
maven_install(
|
|
name = "netty_tcnative",
|
|
artifacts = ["io.netty:netty-tcnative:2.0.25.Final"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Netty BoringSSL
|
|
maven_install(
|
|
name = "netty_boringssl",
|
|
artifacts = ["io.netty:netty-tcnative-boringssl-static:2.0.25.Final"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Open Census (for GRPC)
|
|
maven_install(
|
|
name = "open_census_api",
|
|
artifacts = ["io.opencensus:opencensus-api:0.24.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
maven_install(
|
|
name = "open_census",
|
|
artifacts = ["io.opencensus:opencensus-contrib-http-jetty-client:0.19.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
maven_install(
|
|
name = "open_census_util",
|
|
artifacts = ["io.opencensus:opencensus-contrib-http-util:0.19.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
maven_install(
|
|
name = "open_census_grpc_metrics",
|
|
artifacts = ["io.opencensus:opencensus-contrib-grpc-metrics:0.24.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Perfmark (GRPC)
|
|
maven_install(
|
|
name = "io_perfmark_api",
|
|
artifacts = ["io.perfmark:perfmark-api:0.17.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Google Protobuf Protos
|
|
PROTOBUF_BUILD_FILE = """
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
PROTO_FILES = [
|
|
"google/protobuf/descriptor.proto",
|
|
]
|
|
|
|
filegroup(
|
|
name = "protobuf_files",
|
|
srcs = PROTO_FILES,
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
proto_library(
|
|
name = "protobuf_protos",
|
|
srcs = [":protobuf_files"],
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
"""
|
|
|
|
git_repository(
|
|
name = "com_github_googleapis_googleapis",
|
|
remote = "https://github.com/googleapis/googleapis.git",
|
|
branch = "master",
|
|
)
|
|
load("@com_github_googleapis_googleapis//:repository_rules.bzl", "switched_rules_by_language")
|
|
switched_rules_by_language(
|
|
name = "com_google_googleapis_imports",
|
|
java = True)
|
|
|
|
http_archive(
|
|
name = "common_protos",
|
|
build_file_content = PROTOBUF_BUILD_FILE,
|
|
strip_prefix = "protobuf-3.9.1/src",
|
|
urls = [
|
|
"https://github.com/protocolbuffers/protobuf/releases/download/v3.9.1/protobuf-all-3.9.1.tar.gz",
|
|
],
|
|
)
|
|
|
|
# Java commandline framework.
|
|
maven_install(
|
|
name = "jcommander",
|
|
artifacts = ["com.beust:jcommander:1.72"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
#Javax Inject (for Guice).
|
|
maven_install(
|
|
name = "javax_inject",
|
|
artifacts = ["javax.inject:javax.inject:1"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# JSON Java.
|
|
maven_install(
|
|
name = "json",
|
|
artifacts = ["org.json:json:20090211"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# JSR305 Annotations.
|
|
maven_install(
|
|
name = "jsr305_annotations",
|
|
artifacts = ["com.google.code.findbugs:jsr305:3.0.2"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# AOP (for Guice).
|
|
maven_install(
|
|
name = "aopalliance",
|
|
artifacts = ["aopalliance:aopalliance:1.0"],
|
|
repositories = [
|
|
"https://jcenter.bintray.com",
|
|
"https://maven.google.com",
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
|
|
# Protocol Buffer compiler.
|
|
git_repository(
|
|
name = "com_google_protobuf",
|
|
remote = "https://github.com/google/protobuf.git",
|
|
tag = "v3.9.1",
|
|
)
|
|
|
|
bind(
|
|
name = "protobuf",
|
|
actual = "@com_google_protobuf//:protobuf",
|
|
)
|
|
|
|
bind(
|
|
name = "protobuf_java",
|
|
actual = "@com_google_protobuf//:protobuf_java",
|
|
)
|
|
|
|
# Loads necessary bazel rules for later consumption.
|
|
load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")
|
|
grpc_java_repositories()
|
|
|
|
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
|
protobuf_deps()
|