Skip to content

Commit 0ca76b2

Browse files
committed
added harleyoc maven publishing
1 parent 6ee2b60 commit 0ca76b2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,20 @@ publishing {
130130
maven {
131131
url "file://${project.projectDir}/repo"
132132
}
133+
var mavenUsername = project.findProperty("harleyOConnorMavenUsername")?.toString() ?: System.getenv("MAVEN_USERNAME")
134+
var mavenPassword = project.findProperty("harleyOConnorMavenPassword")?.toString() ?: System.getenv("MAVEN_PASSWORD")
135+
if (mavenUsername == null || mavenPassword == null) {
136+
logger.log(LogLevel.WARN,"Credentials for maven not detected; it will be disabled.")
137+
return
138+
}
139+
maven {
140+
name = "HarleyOConnor"
141+
url = "https://harleyoconnor.com/maven"
142+
credentials {
143+
username = mavenUsername
144+
password = mavenPassword
145+
}
146+
}
133147
}
134148
}
135149

0 commit comments

Comments
 (0)