updated publishing code
This commit is contained in:
@@ -52,4 +52,4 @@ RUN bash -c " \
|
||||
\
|
||||
else echo 'ERROR: Flavor not mentioned' ; \
|
||||
fi ;"
|
||||
RUN bash -c "if [ $FLAVOR != E2ETEST ] ; then ./gradlew publish -DFLAVOR=${FLAVOR} -DNEXUS_URL=${NEXUS_URL} -DNEXUS_USERNAME=${NEXUS_USERNAME} -DNEXUS_PASSWORD=${NEXUS_PASSWORD} ; fi ;"
|
||||
RUN bash -c "if [ $FLAVOR != E2ETEST ] ; then ./gradlew publish -PFLAVOR=${FLAVOR} -PNEXUS_URL=${NEXUS_URL} -PNEXUS_USERNAME=${NEXUS_USERNAME} -PNEXUS_PASSWORD=${NEXUS_PASSWORD} ; fi ;"
|
||||
@@ -230,17 +230,21 @@ repositories {
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
if (project.hasProperty('NEXUS_URL') && project.hasProperty('FLAVOR')) {
|
||||
repository(url: "$NEXUS_URL") {
|
||||
authentication(userName: "$NEXUS_USERNAME", password: "$NEXUS_PASSWORD")
|
||||
}
|
||||
url = "$NEXUS_URL"
|
||||
credentials {
|
||||
username = "$NEXUS_USERNAME"
|
||||
password = "$NEXUS_PASSWORD"
|
||||
}
|
||||
}
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
artifactId = "$FLAVOR"
|
||||
groupId = "com.naviapp"
|
||||
if ("$FLAVOR" == "PROD") {
|
||||
pom.version = "navi_v$VERSION_NAME"
|
||||
version = "navi_v$VERSION_NAME"
|
||||
} else {
|
||||
pom.version = "navi_v$VERSION_NAME-SNAPSHOT"
|
||||
version = "navi_v$VERSION_NAME-SNAPSHOT"
|
||||
}
|
||||
pom.artifactId = "$FLAVOR"
|
||||
pom.groupId = "com.naviapp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user