2

I know how to push a library to jitpack using Android Studio.

For a single library module,

Step 1: I apply this plugin to project level build.gradle,

classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

Step 2: In library module's build.gradle

apply plugin: 'com.github.dcendents.android-maven'
group='com.github.username'

I have two library modules in my project, A and B. B depends on A.

What I want to achieve is push both A and B to jitpack as a single gradle dependency, and provide user a choice to use either A or B. I suppose they can achieve it with something like exclude in build.gradle, right ?

Now, given I have two library modules A and B, do I follow step 2 for both the library module ?

karan vs
  • 3,044
  • 4
  • 19
  • 26

1 Answers1

0

I know it's been a too old thread. Maybe this answer helps someone.

Take a look at repo

https://github.com/Gokuldroid/Lily/blob/master/app/build.gradle

I have three modules lilycore , lilypref , lilytoast. and lilypref and lilytoast depends on lilycore. I hope that's what you need.

Just add

apply plugin: 'com.github.dcendents.android-maven'
group='com.github.username'

in all library modules and use those libraries in your app by using

compile 'com.github.username.RepoName:Module-1:master-SNAPSHOT'
compile 'com.github.username.RepoName:Module-2:master-SNAPSHOT'
compile 'com.github.username.RepoName:Module-3:master-SNAPSHOT'
Gokul Prabhu
  • 112
  • 1
  • 3
  • 7