Skip to content

Commit

Permalink
Improved and reorganised maven repositories handling (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Monti authored and gotev committed Jun 27, 2019
1 parent 842176a commit bd638f4
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions gradle-mavenizer.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,28 @@ project.afterEvaluate {
}

repositories {
maven {
def isToRemoteRepo = getBooleanProperty("mavPublishToRemoteRepo")
if (isToRemoteRepo) {
def isToRemoteRepo = getBooleanProperty("mavPublishToRemoteRepo")
def isToInternalRepo = getBooleanProperty("mavPublishToInternalRepo")
def isToMavenLocal = getBooleanProperty("mavPublishToMavenLocal")

if (isToRemoteRepo) {
maven {
credentials {
username getStringProperty("mavRemoteRepoUser")
password getStringProperty("mavRemoteRepoPassword")
}
url = getStringProperty("mavRepoRemoteUrl")
}
}

def isToInternalRepo = getBooleanProperty("mavPublishToInternalRepo")
if (isToInternalRepo) {
if (isToInternalRepo) {
maven {
url = getStringProperty("mavRepoInternalUrl")
}
}

def isToMavenLocal = getBooleanProperty("mavPublishToMavenLocal")
if (isToMavenLocal || (!isToInternalRepo && !isToRemoteRepo)) {
mavenLocal()
}
if (isToMavenLocal || (!isToInternalRepo && !isToRemoteRepo)) {
mavenLocal()
}
}
}
Expand Down

0 comments on commit bd638f4

Please sign in to comment.