mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
Add separate publishing for Bukkit impl
This commit is contained in:
@@ -9,6 +9,7 @@ import java.nio.file.StandardCopyOption
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
configureCommon()
|
configureCommon()
|
||||||
|
|
||||||
@@ -107,4 +108,28 @@ val testWithPaper = task<JavaExec>(name = "testWithPaper") {
|
|||||||
tasks.named<ShadowJar>("shadowJar") {
|
tasks.named<ShadowJar>("shadowJar") {
|
||||||
relocate("org.bstats.bukkit", "com.dfsek.terra.lib.bstats")
|
relocate("org.bstats.bukkit", "com.dfsek.terra.lib.bstats")
|
||||||
relocate("io.papermc.lib", "com.dfsek.terra.lib.paperlib")
|
relocate("io.papermc.lib", "com.dfsek.terra.lib.paperlib")
|
||||||
|
}
|
||||||
|
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