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:
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -15,7 +15,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
archiveArtifacts artifacts: '**/build/libs/floodgate-*.jar', excludes: "**/build/libs/floodgate-api.jar,**/build/libs/floodgate-core.jar", fingerprint: true
|
archiveArtifacts artifacts: '**/build/libs/floodgate-*.jar', fingerprint: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ import org.gradle.api.artifacts.ProjectDependency
|
|||||||
import org.gradle.kotlin.dsl.named
|
import org.gradle.kotlin.dsl.named
|
||||||
import org.gradle.kotlin.dsl.the
|
import org.gradle.kotlin.dsl.the
|
||||||
|
|
||||||
|
fun Project.isSnapshot(): Boolean =
|
||||||
|
version.toString().endsWith("-SNAPSHOT")
|
||||||
|
|
||||||
fun Project.fullVersion(): String {
|
fun Project.fullVersion(): String {
|
||||||
var version = version.toString()
|
var version = version.toString()
|
||||||
if (version.endsWith("-SNAPSHOT")) {
|
if (version.endsWith("-SNAPSHOT")) {
|
||||||
|
|||||||
@@ -32,12 +32,4 @@ java {
|
|||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
withSourcesJar()
|
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 {
|
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["shadowJar"])
|
||||||
artifact(tasks["sourcesJar"])
|
artifact(tasks["sourcesJar"])
|
||||||
}
|
}
|
||||||
@@ -42,7 +46,7 @@ publishing {
|
|||||||
artifactory {
|
artifactory {
|
||||||
publish {
|
publish {
|
||||||
repository {
|
repository {
|
||||||
setRepoKey("maven-snapshots")
|
setRepoKey(if (isSnapshot()) "maven-snapshots" else "maven-releases")
|
||||||
setMavenCompatible(true)
|
setMavenCompatible(true)
|
||||||
}
|
}
|
||||||
defaults {
|
defaults {
|
||||||
|
|||||||
Reference in New Issue
Block a user