-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Use the maven-publish plugin to publish AAR files. #101276
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
Use the maven-publish plugin to publish AAR files. #101276
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
388499c
to
391ed84
Compare
Builds are currently failing because In this case, the new behaviour would be considered more "correct" from a grade perspective, but it might cause other issues in the ecosystem. It looks like it's possible to adapt |
you may also need to change: flutter/packages/flutter_tools/lib/src/android/gradle_utils.dart Lines 32 to 33 in 0b97874
Maybe, remove |
Based on gradle/gradle#12324 (comment), I think the issue appears to be that we can't configure multiple publications at once. I wonder if it could just configure the task that was currently requested from Dart, and this way, just configure a single publication. |
So that is kind of what I'm trying to do with
|
850481c
to
c210b0c
Compare
Ok, I'm not finding a way to get the maven-publish plugin to resolve these dependencies correctly. What I would like to propose is to put a relocation pom at the old coordinates and then publish the actual artefacts as per the new gradle way (one artefact with classifiers). This way, we keep backward compatibility, but still publish in the "default" way. For reference, this is what the repo structure would then look like:
The
For now, we can also publish the AARs in the old location, but change the documentation to point to the new location. Thoughts? |
@AesSedai101 makes sense :) Thank you for doing all the research! |
perfect! I'll make the changes and update the tests sometime today 🙂 |
77d8bc6
to
ca61493
Compare
6207101
to
1f5bea2
Compare
67f9fbc
to
a4399eb
Compare
a4399eb
to
cdf8fb5
Compare
.ci.yaml
Outdated
@@ -188,13 +188,13 @@ targets: | |||
caches: >- | |||
[ | |||
{"name":"gradle","path":"gradle"}, | |||
{"name": "openjdk", "path": "java"} | |||
{"name": "openjdk", "path": "java11"} |
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.
Name is the one that needs to change, path should be kept as java.
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.
there are many caches in this file that have this entry: {"name": "openjdk", "path": "java11"}
. Are those set incorrectly?
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.
Yes the are all incorrect, the modules will add cache/java to the path and this cache won't have any effect.
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.
got it. can the name be any arbitrary string?
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.
we are usually using dependency_ for named caches.
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.
Done
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.
Nicely done, thank you! LGTM
btw, we are hiring https://docs.flutter.dev/jobs :) |
This PR changes
flutter build aar
to make use of the maven-publish plugin, removing themaven
plugin which as been previously deprecated and removed in Gradle 7.Fixes #101083
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.