bazelbuild / bazelbuild/rules_android

Failure expected when android_library has `assets` but no `manifest`attr defined

Open
#153 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
203
Forks
95
PR merge metrics
No merged PRs in 30d

Description

According to https://bazel.build/reference/be/android#android_binary.manifest:
> The name of the Android manifest file, normally AndroidManifest.xml. Must be defined if resource_files or assets are defined.

The native android rules behave as expected however Starlark rules android will not fail if a `manifest` is missing but `assets` are present. See:

- Native https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResources.java#L89
- Starlark: https://github.com/bazelbuild/rules_android/blob/main/rules/resources.bzl#L1372

Bonus: we should also consider to introduce a new flag which if set will automatically create an empty manifest with the correct package rather than fail the build. This will closer match what Gradle does.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.