Skip to content

Commit 17792ec

Browse files
committed
1 parent e5548da commit 17792ec

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

examples/jetpack_compose/.bazelrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ build --define=android_dexmerger_tool=d8_dexmerger
55
build --define=android_incremental_dexing_tool=d8_dexbuilder
66
build --define=android_standalone_dexing_tool=d8_compat_dx
77

8-
common --enable_workspace=true --enable_bzlmod=false
8+
common --enable_workspace=true --enable_bzlmod=false
9+
common --noincompatible_enable_android_toolchain_resolution
10+
build --platform_mappings=platform_mappings
11+
build --fat_apk_cpu arm64-v8a
12+
# Uncomment the below lines to build for x86
13+
# build --fat_apk_cpu x86_64
14+
build --android_crosstool_top=@androidndk//:toolchain
15+
build --@rules_kotlin//kotlin/settings:jvm_emit_jdeps=False

examples/jetpack_compose/WORKSPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ KOTLIN_TO_COMPOSE = {
8181
load("@rules_jvm_external//:defs.bzl", "maven_install")
8282

8383
maven_install(
84+
name = "maven",
8485
artifacts = KOTLIN_TO_COMPOSE[KOTLINC_RELEASE.version],
86+
fetch_sources = True,
8587
maven_install_json = "//:maven_install-%s.json" % KOTLINC_RELEASE.version,
8688
repositories = [
8789
"https://maven.google.com",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
flags:
2+
# Android
3+
# Mostly, native code is compiled after the android_binary rule has run a transition to compile for that platform.
4+
# We just detect the transition, which sets "Android configuration distinguisher", and then translate the CPU it set.
5+
--Android configuration distinguisher=android
6+
--cpu=arm64-v8a
7+
//:arm64_android_ndk
8+
--Android configuration distinguisher=android
9+
--cpu=x86_64
10+
//:x86_64_android_ndk

0 commit comments

Comments
 (0)