mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-19 14:59:20 +00:00
Attempt to not publish specific modules
This commit is contained in:
@@ -30,6 +30,9 @@ import org.gradle.api.artifacts.ProjectDependency
|
||||
import org.gradle.kotlin.dsl.named
|
||||
import org.gradle.kotlin.dsl.the
|
||||
|
||||
fun Project.isSnapshot(): Boolean =
|
||||
version.toString().endsWith("-SNAPSHOT")
|
||||
|
||||
fun Project.fullVersion(): String {
|
||||
var version = version.toString()
|
||||
if (version.endsWith("-SNAPSHOT")) {
|
||||
|
||||
@@ -32,12 +32,4 @@ java {
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.create<MavenPublication>("mavenJava") {
|
||||
groupId = project.group as String
|
||||
artifactId = "floodgate-" + project.name
|
||||
version = project.version as String
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,11 @@ tasks {
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.named<MavenPublication>("mavenJava") {
|
||||
publications.create<MavenPublication>("mavenJava") {
|
||||
groupId = project.group as String
|
||||
artifactId = "floodgate-" + project.name
|
||||
version = project.version as String
|
||||
|
||||
artifact(tasks["shadowJar"])
|
||||
artifact(tasks["sourcesJar"])
|
||||
}
|
||||
@@ -42,7 +46,7 @@ publishing {
|
||||
artifactory {
|
||||
publish {
|
||||
repository {
|
||||
setRepoKey("maven-snapshots")
|
||||
setRepoKey(if (isSnapshot()) "maven-snapshots" else "maven-releases")
|
||||
setMavenCompatible(true)
|
||||
}
|
||||
defaults {
|
||||
|
||||
Reference in New Issue
Block a user