Skip to content

Commit 199a439

Browse files
committed
aded harleyoc maven publish to common
1 parent 9420780 commit 199a439

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

common/build.gradle

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,26 @@ artifacts {
4949
commonJava sourceSets.main.java.sourceDirectories.singleFile
5050
commonResources sourceSets.main.resources.sourceDirectories.files
5151

52+
}
53+
54+
publishing {
55+
repositories {
56+
maven {
57+
url "file://${project.projectDir}/repo"
58+
}
59+
var mavenUsername = project.findProperty("harleyOConnorMavenUsername")?.toString() ?: System.getenv("MAVEN_USERNAME")
60+
var mavenPassword = project.findProperty("harleyOConnorMavenPassword")?.toString() ?: System.getenv("MAVEN_PASSWORD")
61+
if (mavenUsername == null || mavenPassword == null) {
62+
logger.log(LogLevel.WARN,"Credentials for maven not detected; it will be disabled.")
63+
return
64+
}
65+
maven {
66+
name = "HarleyOConnor"
67+
url = "https://harleyoconnor.com/maven"
68+
credentials {
69+
username = mavenUsername
70+
password = mavenPassword
71+
}
72+
}
73+
}
5274
}

0 commit comments

Comments
 (0)