diff --git a/Dockerfile b/Dockerfile index 87e9a88784..9c34a03023 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 ;" \ No newline at end of file +RUN bash -c "if [ $FLAVOR != E2ETEST ] ; then ./gradlew publish -PFLAVOR=${FLAVOR} -PNEXUS_URL=${NEXUS_URL} -PNEXUS_USERNAME=${NEXUS_USERNAME} -PNEXUS_PASSWORD=${NEXUS_PASSWORD} ; fi ;" \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index ced9c52733..16608f7724 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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" } } }