From 8beae31cee80e94e773c37c15a2956034f1d3e69 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Tue, 20 Sep 2022 16:02:38 -0400 Subject: [PATCH] Copy what Floodgate does for artifact publishing --- Jenkinsfile | 3 +-- .../geyser.publish-conventions.gradle.kts | 17 ++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 28f9e7a37..0123a2771 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,6 @@ pipeline { when { anyOf { branch "master" - branch "feature/extensions" } } @@ -50,7 +49,7 @@ pipeline { rootDir: "", useWrapper: true, buildFile: 'build.gradle.kts', - tasks: 'build artifactoryPublish', + tasks: 'artifactoryPublish', deployerId: "GRADLE_DEPLOYER", resolverId: "GRADLE_RESOLVER" ) diff --git a/build-logic/src/main/kotlin/geyser.publish-conventions.gradle.kts b/build-logic/src/main/kotlin/geyser.publish-conventions.gradle.kts index f1cb8b139..68ab59337 100644 --- a/build-logic/src/main/kotlin/geyser.publish-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/geyser.publish-conventions.gradle.kts @@ -5,24 +5,27 @@ plugins { } publishing { - publications.create("mavenJava") { - groupId = project.group as String - artifactId = project.name - version = project.version as String + publications { + create("mavenJava") { + groupId = project.group as String + artifactId = project.name + version = project.version as String - artifact(tasks["shadowJar"]) - artifact(tasks["sourcesJar"]) + artifact(tasks["shadowJar"]) + artifact(tasks["sourcesJar"]) + } } } artifactory { + setContextUrl("https://repo.opencollab.dev/artifactory") publish { repository { setRepoKey(if (isSnapshot()) "maven-snapshots" else "maven-releases") setMavenCompatible(true) } defaults { - publishConfigs("archives") + publications("mavenJava") setPublishArtifacts(true) setPublishPom(true) setPublishIvy(false)