rules_android icon indicating copy to clipboard operation
rules_android copied to clipboard

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

Open nkoroste opened this issue 10 months ago • 0 comments

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.

nkoroste avatar Oct 02 '23 14:10 nkoroste