Comments (4)
Is this using rules_jvm_external, or is it from hand-written BUILD/WORKSPACE files?
In general if a java rule depends on an android rule, the java rule won't know anything about the android-specific providers (e.g. for android resources) and take only the java ones (it's probably an accident that jvm_import can depend on aar_import at all)
from rules_android.
Is this using rules_jvm_external, or is it from hand-written BUILD/WORKSPACE files? In general if a java rule depends on an android rule, the java rule won't know anything about the android-specific providers (e.g. for android resources) and take only the java ones (it's probably an accident that jvm_import can depend on aar_import at all)
I am using rules_jvm_external (5.3). We can reproduce it with
module(
name = "test_project",
version = "0.0.1",
)
bazel_dep(name = "rules_jvm_external", version = "5.3")
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
name = "maven_deps",
artifacts = [
"androidx.compose.ui:ui:1.5.4",
"androidx.lifecycle:lifecycle-runtime:2.6.1"
],
version_conflict_policy = "pinned",
repositories = [
"https://maven-central.storage.googleapis.com/repos/central/data/",
"https://maven.google.com",
"https://repo1.maven.org/maven2",
],
)
use_repo(maven, "maven_deps")
We can see that androidx_compose_ui_ui(jvm_import) dep on aar_import target androidx_compose_ui_ui_android in
`bazel info output_base`/external/rules_jvm_external\~5.3\~maven\~maven_deps/BUILD
jvm_import(
name = "androidx_compose_ui_ui",
jars = ["v1/https/maven.google.com/androidx/compose/ui/ui/1.5.4/ui-1.5.4.jar"],
srcjar = "v1/https/maven.google.com/androidx/compose/ui/ui/1.5.4/ui-1.5.4-sources.jar",
deps = [
":androidx_compose_runtime_runtime_saveable",
":androidx_compose_ui_ui_android",
":androidx_compose_ui_ui_geometry",
":androidx_compose_ui_ui_graphics",
":androidx_compose_ui_ui_text",
":androidx_compose_ui_ui_unit",
],
tags = [
"maven_coordinates=androidx.compose.ui:ui:1.5.4",
"maven_url=https://maven-central.storage.googleapis.com/repos/central/data/androidx/compose/ui/ui/1.5.4/ui-1.5.4.jar",
],
visibility = ["//visibility:public"],
)
aar_import(
name = "androidx_compose_ui_ui_android",
aar = "v1/https/maven.google.com/androidx/compose/ui/ui-android/1.5.4/ui-android-1.5.4.aar",
srcjar = "v1/https/maven.google.com/androidx/compose/ui/ui-android/1.5.4/ui-android-1.5.4-sources.jar",
deps = [
":androidx_activity_activity_ktx",
":androidx_annotation_annotation",
":androidx_autofill_autofill",
":androidx_collection_collection",
":androidx_compose_runtime_runtime_android",
":androidx_compose_runtime_runtime_saveable_android",
":androidx_compose_ui_ui_geometry",
":androidx_compose_ui_ui_graphics",
":androidx_compose_ui_ui_text",
":androidx_compose_ui_ui_unit",
":androidx_compose_ui_ui_util",
":androidx_core_core",
":androidx_customview_customview_poolingcontainer",
":androidx_emoji2_emoji2",
":androidx_lifecycle_lifecycle_runtime",
":androidx_lifecycle_lifecycle_viewmodel",
":androidx_profileinstaller_profileinstaller",
":androidx_savedstate_savedstate_ktx",
":org_jetbrains_kotlin_kotlin_stdlib",
":org_jetbrains_kotlin_kotlin_stdlib_common",
":org_jetbrains_kotlinx_kotlinx_coroutines_android",
":org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm",
],
tags = [
"maven_coordinates=androidx.compose.ui:ui-android:aar:1.5.4",
"maven_url=https://maven-central.storage.googleapis.com/repos/central/data/androidx/compose/ui/ui-android/1.5.4/ui-android-1.5.4.aar",
],
visibility = ["//visibility:public"],
)
from rules_android.
Version 1.6.0 was released recently, and it's an AAR: https://mvnrepository.com/artifact/androidx.compose.ui/ui/1.6.0
Would you be able to update to this version? That should avoid this problem
from rules_android.
I have updated to version 1.6.0 and the problem seems to be resolved. I appreciate your help.
from rules_android.
Related Issues (20)
- The Starlark implementaiton of process_deploy_jar fails to execute java.create_deploy_jar HOT 5
- Build fails when `--incremental_dexing` is disabled HOT 1
- Remove dependencies on --experimental_google_legacy_api and --experimental_enable_android_migration_apis HOT 1
- Can't build example basicapp HOT 5
- _copy_file and _copy_dir fail on macOS
- AAR libraries from Maven don't expose their resources unlike in built-in Android rules HOT 3
- Mobile install v3 doesn't work with --start=debug HOT 1
- Flags underneath rules/flags/ aren't working correctly HOT 1
- Android platforms breaks incremental dexing and desugaring HOT 4
- mobile-install fails with dependencies from rules_jvm_external HOT 6
- Unable to build with rules_android due to maven install issue HOT 2
- [Bazel CI] android_sdk_repository & android_sdk_repository_platforms_tests are failing with Bazel@HEAD HOT 1
- Bazel query broken at HEAD
- [Bazel CI] ERROR occurred during the fetch of repository 'rules_android_maven'
- APK doesn't include *.version files in metadata
- Rules use entire Android SDK dir as input instead of explicit files which may case poor cache hit HOT 1
- documentation for targets under android_sdk_repository
- Bash is not necessarily in /bin/bash
- No matching toolchains found for types @@bazel_tools//tools/android:sdk_toolchain_type even though called register_toolchains HOT 2
- [FR] Option for mobile-install command to install to all connected devices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_android.