Skip to content

Commit

Permalink
fix(publish.gradle): Basic Authentication
Browse files Browse the repository at this point in the history
Basic Authentication
  • Loading branch information
GeorgeV220 committed Oct 26, 2022
1 parent c0868c0 commit c9f5296
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,40 +49,46 @@ publishing {
}
maven {
maven {
name = "GeorgeV22-Repository"
name = "GeorgeV22"

url = uri("https://repo.georgev22.com/releases/")
url = uri("https://repo.georgev22.com/releases")

def mavenUsername = System.getenv("ORG_GRADLE_PROJECT_MAVENUSERNAME") ? System.getenv("ORG_GRADLE_PROJECT_MAVENUSERNAME") :
System.getProperty("ORG_GRADLE_PROJECT_MAVENUSERNAME") ? System.getProperty("ORG_GRADLE_PROJECT_MAVENUSERNAME") : null
def mavenPassword = System.getenv("ORG_GRADLE_PROJECT_MAVENPASSWORD") ? System.getenv("ORG_GRADLE_PROJECT_MAVENPASSWORD") :
System.getProperty("ORG_GRADLE_PROJECT_MAVENPASSWORD") ? System.getProperty("ORG_GRADLE_PROJECT_MAVENPASSWORD") : null
def mavenUsername = System.getenv("MAVEN_USERNAME") ? System.getenv("MAVEN_USERNAME") :
System.getProperty("MAVEN_USERNAME") ? System.getProperty("MAVEN_USERNAME") : null
def mavenPassword = System.getenv("MAVEN_PASSWORD") ? System.getenv("MAVEN_PASSWORD") :
System.getProperty("MAVEN_PASSWORD") ? System.getProperty("MAVEN_PASSWORD") : null

if (mavenUsername != null && mavenPassword != null) {
credentials {
username = mavenUsername
password = mavenPassword
}
authentication {
basic(BasicAuthentication)
}
}
}
}
}
if (!isGitHub) {
maven {
name = "GeorgeV22-Repository"
name = "GeorgeV22"

url = uri("https://repo.georgev22.com/snapshots/")
url = uri("https://repo.georgev22.com/snapshots")

def mavenUsername = System.getenv("ORG_GRADLE_PROJECT_MAVENUSERNAME") ? System.getenv("ORG_GRADLE_PROJECT_MAVENUSERNAME") :
System.getProperty("ORG_GRADLE_PROJECT_MAVENUSERNAME") ? System.getProperty("ORG_GRADLE_PROJECT_MAVENUSERNAME") : null
def mavenPassword = System.getenv("ORG_GRADLE_PROJECT_MAVENPASSWORD") ? System.getenv("ORG_GRADLE_PROJECT_MAVENPASSWORD") :
System.getProperty("ORG_GRADLE_PROJECT_MAVENPASSWORD") ? System.getProperty("ORG_GRADLE_PROJECT_MAVENPASSWORD") : null
def mavenUsername = System.getenv("MAVEN_USERNAME") ? System.getenv("MAVEN_USERNAME") :
System.getProperty("MAVEN_USERNAME") ? System.getProperty("MAVEN_USERNAME") : null
def mavenPassword = System.getenv("MAVEN_PASSWORD") ? System.getenv("MAVEN_PASSWORD") :
System.getProperty("MAVEN_PASSWORD") ? System.getProperty("MAVEN_PASSWORD") : null

if (mavenUsername != null && mavenPassword != null) {
credentials {
username = mavenUsername
password = mavenPassword
}
authentication {
basic(BasicAuthentication)
}
}
}
}
Expand Down

0 comments on commit c9f5296

Please sign in to comment.