mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 02:25:51 +01:00
Fix publishing
This commit is contained in:
parent
ecf1662547
commit
372911fcb1
@ -53,9 +53,4 @@ subprojects {
|
||||
targetCompatibility = JavaVersion.current()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
publishing.repositories.maven {
|
||||
url = uri("https://repo.codemc.io/repository/maven-snapshots/")
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
|
@ -9,3 +9,26 @@ dependencies {
|
||||
java {
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("api") {
|
||||
from(components.getByName("java"))
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
val releasesRepo = "https://repo.codemc.org/repository/maven-releases/"
|
||||
val snapshotsRepo = "https://repo.codemc.org/repository/maven-snapshots/"
|
||||
|
||||
val versionString = project.version.toString()
|
||||
url = if (versionString.endsWith("-SNAPSHOT")) {
|
||||
uri(snapshotsRepo)
|
||||
} else {
|
||||
uri(releasesRepo)
|
||||
}
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,3 +5,18 @@ repositories {
|
||||
dependencies {
|
||||
loadDependencies(project)
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("server") {
|
||||
from(components.getByName("java"))
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://repo.codemc.org/repository/nms-local/")
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user