Skip to content

Commit

Permalink
chore(bzlmod): enable bzlmod in android/ndk
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Oct 30, 2023
1 parent 611827d commit 15e4e5f
Show file tree
Hide file tree
Showing 7 changed files with 2,962 additions and 4 deletions.
1 change: 0 additions & 1 deletion .bazelci/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ common:
- "//app:app"
android-ndk: &android-ndk
name: "Android NDK"
bazel: 6.3.2
working_directory: ../android/ndk
build_flags:
# TODO(https://github.com/bazelbuild/rules_android/issues/77):
Expand Down
4 changes: 4 additions & 0 deletions android/ndk/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Flags from @bencodes, don't know if these should remain.
build:d8 --incremental_dexing=true
build:d8 --define=android_dexmerger_tool=d8_dexmerger --define=android_incremental_dexing_tool=d8_dexbuilder --define=android_standalone_dexing_tool=d8_compat_dx
build:d8 --experimental_use_dex_splitter_for_incremental_dexing=true --experimental_incremental_dexing_after_proguard_by_default=true --experimental_incremental_dexing_after_proguard=50
3 changes: 1 addition & 2 deletions android/ndk/.bazelversion
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
6.0.0-pre.20221020.1

7.0.0rc2
33 changes: 33 additions & 0 deletions android/ndk/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"Bazel dependencies"

bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "rules_android", version = "0.1.1")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_jvm_external", version = "5.3")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"androidx.appcompat:appcompat:1.5.1",
"androidx.constraintlayout:constraintlayout:2.1.4",
# Needed to enforce version conflict resolution
"androidx.savedstate:savedstate:1.2.0",
"androidx.lifecycle:lifecycle-livedata-core:2.5.1",
"androidx.lifecycle:lifecycle-livedata:2.5.1",
"androidx.lifecycle:lifecycle-process:2.5.1",
"androidx.lifecycle:lifecycle-runtime:2.5.1",
"androidx.lifecycle:lifecycle-service:2.5.1",
"androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1",
"androidx.lifecycle:lifecycle-viewmodel:2.5.1",
],
repositories = [
"https://maven.google.com",
"https://repo1.maven.org/maven2",
],
)
use_repo(maven, "maven")

remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")
use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")

#use_repo_rule("@android_sdk_repository", (name = "androidsdk"))
Loading

0 comments on commit 15e4e5f

Please sign in to comment.