3

I made a android library in github that i want to add to Gradle, that other people can add compile "my project ..." to there android build. how can i upload it to Gradle?

(I didn't find an answer for this anywhere)

EDIT: To clear my question, I want to release a library for developers.

Thanks

2
  • I do not understand the question, are you trying to convert a project from eclipse to Gradle? Commented Feb 22, 2015 at 20:04
  • no, i have a project that i want to release as a library for developers. Commented Feb 22, 2015 at 20:05

2 Answers 2

10

You don't "upload a library to gradle" ;-), you make it accessibla via gradle, so you first have to compile your library and publish the generated artefacts (aar or jar files) to a central repository, like Maven Central.

There are two common Maven repositories at time of this writing:

See this guide as a direction for mavenCentral:

http://www.vandalsoftware.com/post/52468430435/publishing-an-android-library-aar-to-a-maven

Since recent Android Studio versions, JCenter is the preferred default repository, so you may register there and upload your archives to it, like explained here:

https://www.virag.si/2015/01/publishing-gradle-android-library-to-jcenter/

Hope that helps.

Sign up to request clarification or add additional context in comments.

1 Comment

apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray' won't work...
1

The easiest way to expose your library to other developers is by using the JitPack service.

The requirement is that you create a GitHub release and that you have a build file in your repository. It doesn't require that you upload your library.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.