Publish a library to Maven Repositories
Publish .aar file to Maven
In order to publish to a repository in Maven format ,“maven-publish” plugin for gradle can be used.
The plugin should be added to
build.gradle file in library module.
You should define the publication and its identity attributes in
build.gradle file too.
This identity attributes will be shown in the generated pom file and in future for importing this publication you will use them.You also need to define which artifacts you want to publish,for example i just want to publish generated .aar file after building the library.
You will also need to define your repository url
Here is full library
For publishing you can run gradle console command
or you can run from gradle tasks panel