-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Labels
Description
I'm trying to deploy an android_library
to maven, but maven assemble and deployment rules only work with jars, and I need to upload an aar
artifact.
I tried modifying the rules myself to make a PR but for some reason aspects are not working when I define the but I couldn't make it work without having to completely change the deployment rule.aar
as target (and thus pom generation fails). I think it may be a bug with Bazel or the Android rules
The aar
artifact is an implicit output of the android_library
rule, which means it's just a file and aspects do not work on them.
assemble_maven(
name = 'assemble',
target = ':my_android_lib',
)
assemble_maven(
name = 'assemble',
target = ':my_android_lib.aar', # fails because aspects are not executed
)
To make it work I had to modify the deployment so I could generate the pom and then explicitly choose the deployed file:
assemble_maven(
name = 'generate_pom',
target = ':build',
)
publish_maven(
name = 'publish',
pom_file = ':generate_pom',
target = ':build.aar',
sources = ':build.srcjar',
)
Are there any plans on supporting Android aar
files?