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:
@@ -1,27 +1,24 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
id("floodgate.build-logic") apply false
|
||||
// id("com.github.spotbugs") version "4.8.0" apply false
|
||||
|
||||
// id("net.kyori.indra")
|
||||
// id("net.kyori.indra.checkstyle")
|
||||
// id("net.kyori.indra.license-header")
|
||||
|
||||
id("com.github.johnrengelman.shadow") version "7.1.0" apply false
|
||||
id("io.freefair.lombok") version "6.3.0" apply false
|
||||
}
|
||||
|
||||
val platforms = setOf(
|
||||
projects.bungee,
|
||||
projects.spigot,
|
||||
projects.velocity
|
||||
).map { it.dependencyProject }
|
||||
|
||||
val api: Project = projects.api.dependencyProject
|
||||
|
||||
subprojects {
|
||||
// apply(plugin = "pmd")
|
||||
// apply(plugin = "com.github.spotbugs")
|
||||
|
||||
apply {
|
||||
plugin("java-library")
|
||||
plugin("maven-publish")
|
||||
plugin("com.github.johnrengelman.shadow")
|
||||
plugin("io.freefair.lombok")
|
||||
plugin("floodgate.build-logic")
|
||||
}
|
||||
@@ -33,35 +30,13 @@ subprojects {
|
||||
}
|
||||
version = "2.1.1-SNAPSHOT"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
when (this) {
|
||||
in platforms -> plugins.apply("floodgate.shadow-conventions")
|
||||
api -> plugins.apply("floodgate.base-conventions")
|
||||
else -> plugins.apply("floodgate.standard-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("org.checkerframework", "checker-qual", Versions.checkerQual)
|
||||
}
|
||||
|
||||
tasks {
|
||||
val shadowJar = named<ShadowJar>("shadowJar") {
|
||||
archiveBaseName.set("floodgate-${project.name}")
|
||||
archiveVersion.set("")
|
||||
archiveClassifier.set("")
|
||||
}
|
||||
named("build") {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user