| workspace(name = "android_example") |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| |
| RULES_JVM_EXTERNAL_TAG = "2.8" |
| |
| RULES_JVM_EXTERNAL_SHA = "79c9850690d7614ecdb72d68394f994fef7534b292c4867ce5e7dec0aa7bdfad" |
| |
| 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 = [ |
| "androidx.appcompat:appcompat:1.0.0", |
| "junit:junit:4.12", |
| "androidx.test.espresso:espresso-core:3.1.1", |
| "org.hamcrest:hamcrest-library:1.3", |
| "org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc", |
| "com.google.dagger:dagger:2.28", |
| "com.google.dagger:dagger-compiler:2.28", |
| "com.google.dagger:dagger-producers:2.28", |
| "com.google.auto.value:auto-value:1.6.5", |
| "com.google.auto.value:auto-value-annotations:1.6.5", |
| ], |
| repositories = [ |
| "https://jcenter.bintray.com/", |
| "https://maven.google.com", |
| "https://repo1.maven.org/maven2", |
| ], |
| ) |
| |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| |
| http_archive( |
| name = "build_bazel_rules_android", |
| sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", |
| strip_prefix = "rules_android-0.1.1", |
| urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], |
| ) |
| |
| load( |
| "@build_bazel_rules_android//android:rules.bzl", |
| "android_ndk_repository", |
| "android_sdk_repository", |
| ) |
| |
| android_sdk_repository(name = "androidsdk") |
| |
| android_ndk_repository(name = "androidndk") # Required. Name *must* be "androidndk". |
| |
| # Directly load the kotlin rules from the parent repo. |
| local_repository( |
| name = "io_bazel_rules_kotlin", |
| path = "../..", |
| ) |
| |
| load("@io_bazel_rules_kotlin//kotlin:dependencies.bzl", "kt_download_local_dev_dependencies") |
| |
| kt_download_local_dev_dependencies() |
| |
| load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kotlin_repositories", "kt_register_toolchains") |
| |
| kotlin_repositories() |
| |
| register_toolchains("//bzl:experimental_toolchain") |
| |
| http_archive( |
| name = "rules_pkg", |
| sha256 = "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a", |
| url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz", |
| ) |
| |
| http_archive( |
| name = "build_bazel_rules_android", |
| sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", |
| strip_prefix = "rules_android-0.1.1", |
| urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], |
| ) |