Comments (11)
from rules_android.
I think that's referenced here:
https://github.com/bazelbuild/bazel/blob/d0e29582a2e788e8acdaf53fe30ab7f7dc592df3/tools/android/BUILD.tools#L448
For the starlark rules at least, I think we can point them here instead:
rules_android/tools/android/BUILD
Line 35 in a6b9b79
from rules_android.
Hm, we appear to already be doing that:
from rules_android.
So probably coming from the parts of android_binary that are still in native:
rules_android/rules/android_binary.bzl
Line 43 in a6b9b79
from rules_android.
But I think we could replace this:
with this:
rules_android/tools/android/BUILD
Lines 34 to 42 in a6b9b79
and change the name to match the existing alias, it should "just work"
from rules_android.
Hi folks,
quick question - i'm new to bzlmod and trying to setup my android project using bzlmod.
I'm not sure if there's an equivalent to WORKSPACE's android_sdk_repository
in bzlmod? When i try to build android_library
targets with my MODULE.bazel depending on rules_android
module i run into the following error:
While resolving toolchains for target //:sample: No matching toolchains found for types @bazel_tools//tools/android:sdk_toolchain_type.
Wondering if this is related to this issue. i.e. it's not possible yet to setup android projects using bzlmod?
from rules_android.
@telescopic Bzlmod works now but you will need to be using the latest Bazel rolling release until the actual fix get backported into the 6.x release track.
from rules_android.
@Bencodes thanks for your reply - is there any documentation surrounding the same?
from rules_android.
@telescopic not much documentation right now.
Bzlmod doesn't actually seem to be fully working if you are using rules_android
at HEAD. If you are still using the native rules it's possible to get everything working. Example: https://github.com/robolectric/robolectric-bazel/tree/master/examples/simple
from rules_android.
bzlmod support doesn't seem to be working at all:
I created a minimal example showing that following the basic instructions on the main README here leads to the repo not being found.
EDIT
Huh apparently I had a problem with my bazelrc (failed to include line-continuations), adding those in so the flags were all present I ended up with a different error:
ERROR: no such package '@@android_gmaven_r8//jar': The repository '@@android_gmaven_r8' could not be resolved: Repository '@@android_gmaven_r8' is not defined
ERROR: D:/_bazel_out/lbijidmj/external/androidsdk/BUILD.bazel:31:25: no such package '@@android_gmaven_r8//jar': The repository '@@android_gmaven_r8' could not be resolved: Repository '@@android_gmaven_r8' is not defined and referenced by
'@@androidsdk//:d8_jar_import'
from rules_android.
Hi @bdleitner,
The README is sadly not entirely up to date, especially for bzlmod integration. We will address documentation shortcomings later this year as part of the overall rules maturation process. I have a change in progress that adds the following lines to MODULE.bazel for the example app that should address the issue you're seeing.
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")
from rules_android.
Related Issues (20)
- android_binary_internal transition failing during analysis HOT 1
- Enable android_instrumentation_test on mac
- jvm_import won't provide android_resource provider caused compose1.5.4 to break HOT 4
- Error no such target '@@remote_java_tools_darwin_x86_64//:turbine_direct_graal': target 'turbine_direct_graal' not declared in package . HOT 3
- Support bundling local resource from `resources/` dir into `android_library` and `android_binary` HOT 1
- aidl rust backend HOT 3
- Bazel AndroidManifest merging doesn't preserve the correct order HOT 5
- Bug: ProguardMapping is not queryable nor deterministically generated HOT 1
- Default debug_keystore is missing HOT 2
- Migrate Rules docs from Native rules to Starlark Rules HOT 1
- Migrate Bazel Android Tools from bazel repo to rules_android repo HOT 1
- Remove exports_manifest attribute of android_library HOT 2
- The new Golang implementation for the BumpMinSdkFloor action fails when manfiest doesn't have namespace HOT 2
- deploy_info gobinary visibility breaks builds when defining a custom android toolchain
- 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 2
- 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
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.