Skip to content

Commit

Permalink
Add Bazel build.
Browse files Browse the repository at this point in the history
I realize this will make upstreaming changes less likely.

At the moment, building requires Bazel 6.0.0-pre.20220421.3
due to bazelbuild/bazel#13989.
  • Loading branch information
franksalim committed May 4, 2022
1 parent ffdf8e2 commit 2f15471
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
18 changes: 18 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

android_binary(
name = "markers",
srcs = glob(["src/**/*.java"]),
custom_package = "com.google.android.apps.markers",
manifest = "AndroidManifest.xml",
deps = [
":resources",
],
)

android_library(
name = "resources",
manifest = "AndroidManifest.xml",
custom_package = "org.dsandler.apps.markers",
resource_files = glob(["res/**"]),
)
16 changes: 16 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Load the Android build rules
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_android",
urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
strip_prefix = "rules_android-0.1.1",
)

# Configure Android SDK Path
load("@build_bazel_rules_android//android:rules.bzl", "android_sdk_repository")
android_sdk_repository(
name = "androidsdk",
path = "/home/frank/Android/Sdk",
)

0 comments on commit 2f15471

Please sign in to comment.