| # Copyright (C) 2017 The Dagger 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. |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| |
| http_archive( |
| name = "google_bazel_common", |
| sha256 = "f20aaaf1d80fa5fbe9843792cd199ab213ab63ee8a0f3931dd14ae7a9d528f05", |
| strip_prefix = "bazel-common-4c4c70bdf2a9f5bc9afdf2c27dfcb905cac2eea1", |
| urls = ["https://github.com/google/bazel-common/archive/4c4c70bdf2a9f5bc9afdf2c27dfcb905cac2eea1.zip"], |
| ) |
| |
| load("@google_bazel_common//:workspace_defs.bzl", "google_common_workspace_rules") |
| |
| google_common_workspace_rules() |
| |
| # This fixes an issue with protobuf starting to use zlib by default in 3.7.0. |
| # TODO(ronshapiro): Figure out if this is in fact necessary, or if proto can depend on the |
| # @bazel_tools library directly. See discussion in |
| # https://github.com/protocolbuffers/protobuf/pull/5389#issuecomment-481785716 |
| bind( |
| name = "zlib", |
| actual = "@bazel_tools//third_party/zlib", |
| ) |
| |
| RULES_JVM_EXTERNAL_TAG = "2.7" |
| |
| RULES_JVM_EXTERNAL_SHA = "f04b1466a00a2845106801e0c5cec96841f49ea4e7d1df88dc8e4bf31523df74" |
| |
| http_archive( |
| name = "rules_jvm_external", |
| sha256 = RULES_JVM_EXTERNAL_SHA, |
| strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, |
| url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, |
| ) |
| |
| load("@rules_jvm_external//:defs.bzl", "maven_install") |
| |
| maven_install( |
| artifacts = [ |
| "com.android.support:support-annotations:25.0.0", |
| "com.android.support:support-fragment:25.0.0", |
| "com.android.support:appcompat-v7:25.0.0", |
| "org.jetbrains.kotlin:kotlin-stdlib:1.3.50", |
| "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0", |
| ], |
| repositories = [ |
| "https://repo1.maven.org/maven2", |
| "https://maven.google.com", |
| ], |
| ) |
| |
| # TODO(user): Remove once Google publishes internal Kotlin rules. |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| |
| RULES_KOTLIN_VERSION = "legacy-1.3.0-rc1" |
| |
| RULES_KOTLIN_SHA = "9de078258235ea48021830b1669bbbb678d7c3bdffd3435f4c0817c921a88e42" |
| |
| http_archive( |
| name = "io_bazel_rules_kotlin", |
| sha256 = RULES_KOTLIN_SHA, |
| strip_prefix = "rules_kotlin-%s" % RULES_KOTLIN_VERSION, |
| type = "zip", |
| urls = ["https://github.com/bazelbuild/rules_kotlin/archive/%s.zip" % RULES_KOTLIN_VERSION], |
| ) |
| |
| load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kotlin_repositories", "kt_register_toolchains") |
| |
| kotlin_repositories() |
| |
| kt_register_toolchains() |