I did a lot of research and I could't get one thing I have created my own framework and I want put in on gradle.
I do not want copy paste every time a lot of code from one project to another.
I want to do like this
compile 'xxxxx'
What should I do here to set this up?
To achieve it you have some ways:
publish your library (artifact) in central maven or jcenter.
These repo are public, it means that your artifacts will be public.
use a github repo and the jitpack plugin
These repo are public, it means that your artifacts will be public.
publish the aar in a local maven repo (local o private)
In this case the artifact can be private.
To publish a library in Central Maven or JCenter, it is very long to explain in an answer. Hovewer you can read these posts:
Publish on JCenter
Publish on Central Maven
To install a private maven , you can evaluate the nexus repository.
Check this link for more info.