Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,29 @@ http_archive(
url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
)

# Add rules_jvm_external for Maven dependencies
RULES_JVM_EXTERNAL_TAG = "4.5"
RULES_JVM_EXTERNAL_SHA = "b17d7388feb9a8a510e42e1f79c3b94799953d03e12ead565bf9d3e33f1b74ba"

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")

# Install logback-core Maven dependency
maven_install(
artifacts = [
"maven_install.json",
],
repositories = [
"https://repo1.maven.org/maven2",
],
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()
Expand All @@ -33,6 +56,29 @@ python_repository(name = "python_version_repo")

load("@python_version_repo//:py_version.bzl", "TF_PYTHON_VERSION")

# Add rules_jvm_external for Maven dependencies
RULES_JVM_EXTERNAL_TAG = "4.5"
RULES_JVM_EXTERNAL_SHA = "b17d7388feb9a8a510e42e1f79c3b94799953d03e12ead565bf9d3e33f1b74ba"

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")

# Install logback-core Maven dependency
maven_install(
artifacts = [
"maven_install.json",
],
repositories = [
"https://repo1.maven.org/maven2",
],
)

python_register_toolchains(
name = "python",
ignore_root_user_error = True,
Expand Down
14 changes: 14 additions & 0 deletions maven_install.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

{
"artifacts": [
{
"group": "ch.qos.logback",
"artifact": "logback-core",
"version": "1.0.13",
"sha1": "dc6e6ce937347bd4d990fc89f4ceb469db53e45e"
}
],
"repositories": [
"https://repo1.maven.org/maven2"
]
}
16 changes: 16 additions & 0 deletions tensorflow/java/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ load(
"tf_java_test",
)

load("@rules_jvm_external//:defs.bzl", "maven_jar")

maven_jar(
name = "logback-core",
artifact = "ch.qos.logback:logback-core:1.0.13",
sha1 = "dc6e6ce937347bd4d990fc89f4ceb469db53e45e",
)

load("@rules_jvm_external//:defs.bzl", "maven_jar")

maven_jar(
name = "logback-core",
artifact = "ch.qos.logback:logback-core:1.0.13",
sha1 = "dc6e6ce937347bd4d990fc89f4ceb469db53e45e",
)

package(
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
default_visibility = ["//visibility:private"],
Expand Down