6harat
6harat

Reputation: 622

Publishing gradle sub-project artifacts using a commons project

Consider the following project structure:

app
|_subprojA
|   |_build.gradle
|_subprojB
|   |_build.gradle
|_settings.gradle

settings.gradle

include 'subprojA'
include 'subprojB'

build.gradle (subprojA)

...
dependencies {
...
}

build.gradle (subprojB)

...
dependencies {
  compile project(':subprojA')
}

Run ./gradlew subprojA:uploadArchives and ./gradlew subprojB:uploadArchives

another project, try importing com.abc:subprojB:x.y.z complains that subprojA is not available in any repo.

What I want: in my local i want subprojB to point to the local subprojA for ease in development but while publishing subprojB to artifactory i want it to create a transitive dependency on com.abc:subprojA:x.y.z.

Upvotes: 0

Views: 63

Answers (0)

Related Questions