Publishing an AAR
The merged aar is included in a Gradle SoftwareComponent
that you can publish using your plugin of choice.
One component is created per library variant, using the same name as the variant.
Integrating publishing with common publishing plugins is very simple, but direct access to the generated aar
file
is also available if a custom publishing solution is needed.
com.vanniktech.maven.publish
https://github.com/vanniktech/gradle-maven-publish-plugin
You will need to specify the variant name of the merged aar you want to publish via a project property:
Custom Publishing
If you have your own custom publishing step, you can reference the generated aar
file as a property like so:
If using Android Gradle Plugin 8.0 or higher, make sure you've also set up variant publishing. Consult with the variant publication documentation if you need additional customization.