mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 14:50:56 +00:00
add publishing stuff
This commit is contained in:
@@ -2,6 +2,7 @@ import com.dfsek.terra.configureCommon
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
configureCommon()
|
configureCommon()
|
||||||
@@ -21,3 +22,28 @@ dependencies {
|
|||||||
|
|
||||||
"shadedApi"("com.google.guava:guava:30.0-jre")
|
"shadedApi"("com.google.guava:guava:30.0-jre")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("mavenJava") {
|
||||||
|
artifact(tasks["sourcesJar"])
|
||||||
|
artifact(tasks["jar"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
val mavenUrl = "https://repo.codemc.io/repository/maven-releases/"
|
||||||
|
val mavenSnapshotUrl = "https://repo.codemc.io/repository/maven-snapshots/"
|
||||||
|
|
||||||
|
maven(mavenUrl) {
|
||||||
|
val mavenUsername: String? by project
|
||||||
|
val mavenPassword: String? by project
|
||||||
|
if (mavenUsername != null && mavenPassword != null) {
|
||||||
|
credentials {
|
||||||
|
username = mavenUsername
|
||||||
|
password = mavenPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user