2

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?

Manfred Moser
  • 29,539
  • 13
  • 92
  • 123
pmb
  • 2,327
  • 3
  • 30
  • 47

1 Answers1

5

To achieve it you have some ways:

  1. publish your library (artifact) in central maven or jcenter.
    These repo are public, it means that your artifacts will be public.

  2. use a github repo and the jitpack plugin
    These repo are public, it means that your artifacts will be public.

  3. 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:

To install a private maven , you can evaluate the nexus repository.
Check this link for more info.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • Thanks @Gabriele You gave me the way how to do this. – pmb Feb 15 '16 at 08:47
  • bro, you need to make that a FAQ -- same answer over and over :) can you expand with more specifics? Or maybe, short and sweet is good...? – Thufir Mar 10 '16 at 10:48