Skip to content

williamyyu/PublishLibraryByJitPack

Repository files navigation

Publish an Android Library by JitPack

(https://jitpack.io/#ome450901/TestPublishLibrary)

See more detail in my Blog

image

JitPack is a novel package repository for JVM and Android projects. It builds Git projects on demand and provides you with ready-to-use artifacts (jar, aar).

Steps

  1. Create an Android project and add a library module, here my library module name is mylibrary.
  2. Add the android-maven plugin in your project/build.gradle
  3. In your library/build.gradle add maven plugin and group setting
  4. Upload this project to your github
  5. Create a release tag
  6. Open JitPack and lookup your repository
  7. Now you can get your library from JitPack!

Other Git Hosts

JitPack also works with other Git hosting providers. The only difference is the groupId of your artifacts:

  • BitBucket: org.bitbucket.Username:Repo:Tag
  • GitLab: com.gitlab.Username:Repo:Tag

Private Repos

Currently seems only github and bitbucket are works.(2017/03/06)

References