1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-19 14:59:20 +00:00

Another attempt to make publishing work

This commit is contained in:
Tim203
2021-12-11 00:31:19 +01:00
parent 5e7bd40960
commit 21756bbca1
5 changed files with 31 additions and 10 deletions

6
Jenkinsfile vendored
View File

@@ -32,6 +32,7 @@ pipeline {
rtGradleDeployer(
id: "GRADLE_DEPLOYER",
serverId: "opencollab-artifactory",
repo: "opencollab-deployer",
releaseRepo: "maven-releases",
snapshotRepo: "maven-snapshots"
)
@@ -40,11 +41,12 @@ pipeline {
serverId: "opencollab-artifactory"
)
rtGradleRun(
usesPlugin: false,
usesPlugin: true,
tool: 'Gradle 7',
rootDir: "",
useWrapper: true,
buildFile: 'build.gradle.kts',
tasks: 'build publish',
tasks: 'build artifactoryPublish',
deployerId: "GRADLE_DEPLOYER",
resolverId: "GRADLE_RESOLVER"
)

View File

@@ -9,4 +9,5 @@ repositories {
dependencies {
implementation("gradle.plugin.com.github.jengelman.gradle.plugins", "shadow", "7.0.0")
implementation("org.jfrog.buildinfo", "build-info-extractor-gradle", "4.25.2")
}

View File

@@ -31,8 +31,8 @@ java {
publishing {
publications.create<MavenPublication>("mavenJava") {
groupId = rootProject.group as String
artifactId = project.name
version = rootProject.version as String
groupId = project.group as String
artifactId = "floodgate-" + project.name
version = project.version as String
}
}

View File

@@ -3,6 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("floodgate.base-conventions")
id("com.github.johnrengelman.shadow")
id("com.jfrog.artifactory")
}
tasks {
@@ -31,3 +32,18 @@ publishing {
artifact(tasks["sourcesJar"])
}
}
artifactory {
publish {
repository {
setRepoKey("opencollab-deployer")
setMavenCompatible(true)
}
defaults {
publishConfigs("archives")
setPublishArtifacts(true)
setPublishPom(true)
setPublishIvy(false)
}
}
}

View File

@@ -5,6 +5,11 @@ plugins {
id("io.freefair.lombok") version "6.3.0" apply false
}
allprojects{
group = "org.geysermc.floodgate"
version = "2.1.1-SNAPSHOT"
}
val platforms = setOf(
projects.bungee,
projects.spigot,
@@ -23,12 +28,9 @@ subprojects {
plugin("floodgate.build-logic")
}
group = "org.geysermc.floodgate"
//todo make nicer
if (project.name in arrayOf("mysql", "sqlite")) {
group = group as String + ".database"
if (project.projectDir.startsWith("database/")) {
group = rootProject.group as String + ".database"
}
version = "2.1.1-SNAPSHOT"
when (this) {
in platforms -> plugins.apply("floodgate.shadow-conventions")