-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maven_export
support for bundling AARs
#1049
base: master
Are you sure you want to change the base?
Conversation
4868acf
to
44f4355
Compare
|
||
if (mainArtifact != null) { | ||
String ext = | ||
com.google.common.io.Files.getFileExtension(mainArtifact.getFileName().toString()); | ||
futures.add(upload(repo, credentials, coords, "." + ext, mainArtifact, gpgSign)); | ||
} | ||
|
||
futures.add(upload(repo, credentials, coords, ".pom", pom, gpgSign)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant discussion for this change:
typedb/bazel-distribution#318
Might break this out into a separate contribution since this is unrelated, yet necessary for publishing support for Artifactory repositories.
@ahumesky could you advise on the use of Or are there alternative upstream mechanisms that tackles bazelbuild/rules_android#323? |
This PR adds (limited) support for bundling AARs for distribution with
maven_publish
. It optimistically uses an.aar
fromAndroidLibraryAarInfo
as the basis for bundling and then merges the transitive closure with the nestedclasses.jar
using the existing logic.Usage of
AndroidLibraryAarInfo
requires an--experimental_google_legacy_api
flag, which is pretty undesirable given it would require consumers to configure the same flag, even if not using for publishing Android artifacts. As such, I understand this PR probably isn't acceptable from a generic standpoint, but I wanted to open it up for feedback, ideas, and inspiration. This is what we'll be using to publish our Android targets until we can find a better alternative.Example usages:
External example (we're using an Android databinding wrapper which does work to create a base
.aar
instead ofandroid_library
):https://github.com/player-ui/player/blob/78345ac70c5bb34fcd58147ab49e38f22d3524fd/android/player/BUILD#L10-L27
Semi-relevant:
bazelbuild/rules_android#323