fixed publications

This commit is contained in:
rahul bhat
2022-05-25 18:38:10 +05:30
parent f427ad099d
commit 160df01e14

View File

@@ -229,7 +229,7 @@ repositories {
publishing {
repositories {
if (project.hasProperty('NEXUS_URL') && project.hasProperty('FLAVOR')) {
if (project.hasProperty('NEXUS_URL')) {
maven {
url = "$NEXUS_URL"
credentials {
@@ -237,16 +237,25 @@ publishing {
password = "$NEXUS_PASSWORD"
}
}
publications {
maven(MavenPublication) {
artifactId = "$FLAVOR"
groupId = "com.naviapp"
if ("$FLAVOR" == "PROD") {
version = "test_v1$VERSION_NAME"
} else {
version = "test_v1$VERSION_NAME-SNAPSHOT"
}
artifact('build/outputs/apk/prod/release/app-prod-release.apk')
}
}
publications {
if (project.hasProperty('NEXUS_URL') && project.hasProperty('FLAVOR')) {
maven(MavenPublication) {
artifactId = "$FLAVOR"
groupId = "com.naviapp"
if ("$FLAVOR" == "PROD") {
version = "test_v2$VERSION_NAME"
} else {
version = "test_v2$VERSION_NAME-SNAPSHOT"
}
artifacts {
if ("$FLAVOR" == "PROD")
archives file('build/outputs/apk/prod/release/app-prod-release.apk')
else if ("$FLAVOR" == "QA")
archives file('build/outputs/apk/qa/release/app-qa-release.apk')
else
archives file('build/outputs/apk/dev/release/app-dev-release.apk')
}
}
}