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

View File

@@ -9,4 +9,5 @@ repositories {
dependencies { dependencies {
implementation("gradle.plugin.com.github.jengelman.gradle.plugins", "shadow", "7.0.0") 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 { publishing {
publications.create<MavenPublication>("mavenJava") { publications.create<MavenPublication>("mavenJava") {
groupId = rootProject.group as String groupId = project.group as String
artifactId = project.name artifactId = "floodgate-" + project.name
version = rootProject.version as String version = project.version as String
} }
} }

View File

@@ -3,6 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins { plugins {
id("floodgate.base-conventions") id("floodgate.base-conventions")
id("com.github.johnrengelman.shadow") id("com.github.johnrengelman.shadow")
id("com.jfrog.artifactory")
} }
tasks { tasks {
@@ -31,3 +32,18 @@ publishing {
artifact(tasks["sourcesJar"]) 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 id("io.freefair.lombok") version "6.3.0" apply false
} }
allprojects{
group = "org.geysermc.floodgate"
version = "2.1.1-SNAPSHOT"
}
val platforms = setOf( val platforms = setOf(
projects.bungee, projects.bungee,
projects.spigot, projects.spigot,
@@ -23,12 +28,9 @@ subprojects {
plugin("floodgate.build-logic") plugin("floodgate.build-logic")
} }
group = "org.geysermc.floodgate" if (project.projectDir.startsWith("database/")) {
//todo make nicer group = rootProject.group as String + ".database"
if (project.name in arrayOf("mysql", "sqlite")) {
group = group as String + ".database"
} }
version = "2.1.1-SNAPSHOT"
when (this) { when (this) {
in platforms -> plugins.apply("floodgate.shadow-conventions") in platforms -> plugins.apply("floodgate.shadow-conventions")