Hi I have a gradle android project that contains two library modules:
- MyProject
|-- LibA
|-- LibB
So LibB has a dependency to LibA. So the build.gradle file for LibB looks like this:
apply plugin: 'android-library'
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://$buildDir/repo")
pom.groupId = 'com.test.lib'
pom.version = '1.0'
}
}
}
dependencies {
compile 'com.android.support:support-v4:19.+'
compile project (':LibA')
}
As you see I would like to generate .aar files for each of my libraries modules in my gradle project. So far so good, but generating the pom.xml file with the correct dependency to LibA does not work like expected:
The pom.xml file for LibB looks like this:
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>19.+</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>MyProject</groupId>
<artifactId>LibA</artifactId>
<version>unspecified</version>
<scope>compile</scope>
</dependency>
Is there a way to specify how the maven dependency for LibA should look like in the generated pom file. How does other projects like ActionBar-PullToRefresh do that? For instance: ActionBar-PullToRefresh has an sub library module for Actionbar sherlock which has a dependency to :library the mail ActionBar-PullToRefresh library
Any suggestion?