256 lines
6.5 KiB
Python
256 lines
6.5 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
|
|
http_archive(
|
|
name = "io_grpc_grpc_java",
|
|
strip_prefix = "grpc-java-1.36.0",
|
|
url = "https://github.com/grpc/grpc-java/archive/v1.36.0.zip",
|
|
)
|
|
|
|
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS")
|
|
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS")
|
|
|
|
maven_install(
|
|
artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS,
|
|
generate_compat_repositories = True,
|
|
override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS,
|
|
repositories = [
|
|
"https://repo.maven.apache.org/maven2/",
|
|
],
|
|
)
|
|
|
|
load("@maven//:compat.bzl", "compat_repositories")
|
|
compat_repositories()
|
|
|
|
load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")
|
|
grpc_java_repositories()
|
|
|
|
# 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",
|
|
],
|
|
)
|
|
|
|
# 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",
|
|
)
|
|
|
|
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
|
protobuf_deps()
|