Mercurial
comparison gara/android/firebase-cloud-messaging/WORKSPACE @ 47:829623189a57
[Gara] Android commit. Bazelfied it.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Sat, 13 Dec 2025 14:20:34 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 46:b9a40c633c93 | 47:829623189a57 |
|---|---|
| 1 # FIXME(alexeagle): move to bzlmod | |
| 2 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
| 3 | |
| 4 RULES_JVM_EXTERNAL_TAG = "5.3" | |
| 5 | |
| 6 RULES_JVM_EXTERNAL_SHA = "d31e369b854322ca5098ea12c69d7175ded971435e55c18dd9dd5f29cc5249ac" | |
| 7 | |
| 8 http_archive( | |
| 9 name = "rules_jvm_external", | |
| 10 sha256 = RULES_JVM_EXTERNAL_SHA, | |
| 11 strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, | |
| 12 url = | |
| 13 "https://github.com/bazelbuild/rules_jvm_external/releases/download/%s/rules_jvm_external-%s.tar.gz" % (RULES_JVM_EXTERNAL_TAG, RULES_JVM_EXTERNAL_TAG), | |
| 14 ) | |
| 15 | |
| 16 load("@rules_jvm_external//:defs.bzl", "maven_install") | |
| 17 | |
| 18 maven_install( | |
| 19 aar_import_bzl_label = "@rules_android//rules:rules.bzl", | |
| 20 artifacts = [ | |
| 21 "com.google.firebase:firebase-messaging:17.0.0", | |
| 22 "com.android.support:appcompat-v7:26.1.0", | |
| 23 "com.android.support.constraint:constraint-layout:1.0.2", | |
| 24 "com.google.code.gson:gson:2.8.2", | |
| 25 ], | |
| 26 # See https://github.com/bazelbuild/rules_jvm_external/#repository-aliases | |
| 27 # This can be removed if none of your external dependencies uses `maven_jar`. | |
| 28 generate_compat_repositories = True, | |
| 29 repositories = [ | |
| 30 "https://jcenter.bintray.com", | |
| 31 "https://maven.google.com", | |
| 32 "https://repo1.maven.org/maven2", | |
| 33 ], | |
| 34 use_starlark_android_rules = True, | |
| 35 version_conflict_policy = "pinned", | |
| 36 ) | |
| 37 | |
| 38 load("@maven//:compat.bzl", "compat_repositories") | |
| 39 | |
| 40 compat_repositories() | |
| 41 | |
| 42 TOOLS_ANDROID_COMMIT = "0e864ba5a86958513658250de587416d8e17c481" | |
| 43 | |
| 44 http_archive( | |
| 45 name = "tools_android", | |
| 46 repo_mapping = { | |
| 47 "@com_google_code_gson_2_8_2": "@com_google_code_gson_gson", | |
| 48 }, | |
| 49 sha256 = "57c50d6331ba578fc8adfcede20ef12b437cb4cc2edf60c852e4b834eefee5fc", | |
| 50 strip_prefix = "tools_android-" + TOOLS_ANDROID_COMMIT, | |
| 51 url = "https://github.com/bazelbuild/tools_android/archive/%s.tar.gz" % TOOLS_ANDROID_COMMIT, | |
| 52 ) | |
| 53 | |
| 54 RULES_ANDROID_COMMIT = "93e27030d3f0defa39cbbc35195638cb772b0c27" | |
| 55 | |
| 56 http_archive( | |
| 57 name = "rules_android", | |
| 58 sha256 = "71cae2413868a24f17d43fd595af6f3905d2e5b3235f76514f54800bfd90c903", | |
| 59 strip_prefix = "rules_android-" + RULES_ANDROID_COMMIT, | |
| 60 urls = ["https://github.com/bazelbuild/rules_android/archive/%s.zip" % RULES_ANDROID_COMMIT], | |
| 61 ) | |
| 62 | |
| 63 load("@rules_android//:prereqs.bzl", "rules_android_prereqs") | |
| 64 | |
| 65 rules_android_prereqs() | |
| 66 | |
| 67 load("@rules_android//:defs.bzl", "rules_android_workspace") | |
| 68 | |
| 69 rules_android_workspace() | |
| 70 | |
| 71 load("@rules_android//rules:rules.bzl", "android_sdk_repository") | |
| 72 | |
| 73 # Requires that the ANDROID_HOME environment variable is set to the Android SDK path. | |
| 74 android_sdk_repository( | |
| 75 name = "androidsdk", | |
| 76 ) | |
| 77 | |
| 78 register_toolchains( | |
| 79 "@rules_android//toolchains/android:android_default_toolchain", | |
| 80 "@rules_android//toolchains/android_sdk:android_sdk_tools", | |
| 81 ) |