mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-19 14:59:20 +00:00
Avoid using allprojects and subprojects blocks to decouple modules (#606)
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
plugins {
|
||||||
|
id("floodgate.publish-conventions")
|
||||||
|
id("floodgate.shadow-conventions")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(libs.cumulus)
|
api(libs.cumulus)
|
||||||
api(libs.events)
|
api(libs.events)
|
||||||
|
|||||||
@@ -1,62 +1,3 @@
|
|||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
id("floodgate.base-conventions")
|
||||||
alias(libs.plugins.micronaut) apply false
|
|
||||||
alias(libs.plugins.lombok) apply false
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
group = "org.geysermc.floodgate"
|
|
||||||
description = "Allows Bedrock players to join Java edition servers while keeping the server in online mode"
|
|
||||||
|
|
||||||
apply {
|
|
||||||
plugin("net.kyori.indra.git")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldAddBranchName()) {
|
|
||||||
version = versionWithBranchName()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//todo differentiate maven publishing from downloads publishing
|
|
||||||
val deployProjects = setOf(
|
|
||||||
projects.api,
|
|
||||||
projects.coreCommon,
|
|
||||||
projects.coreNetty4,
|
|
||||||
projects.isolation,
|
|
||||||
projects.bungee,
|
|
||||||
projects.spigot,
|
|
||||||
projects.velocity,
|
|
||||||
projects.bungeeBase,
|
|
||||||
projects.spigotBase,
|
|
||||||
projects.velocityBase,
|
|
||||||
projects.universal
|
|
||||||
).map { it.dependencyProject }
|
|
||||||
|
|
||||||
val shadowProjects = setOf(
|
|
||||||
projects.api,
|
|
||||||
projects.coreCommon,
|
|
||||||
projects.coreNetty4,
|
|
||||||
projects.bungeeBase,
|
|
||||||
projects.spigotBase,
|
|
||||||
projects.velocityBase,
|
|
||||||
projects.universal
|
|
||||||
).map { it.dependencyProject }
|
|
||||||
|
|
||||||
//todo re-add checkstyle when we switch back to 2 space indention
|
|
||||||
// and take a look again at spotbugs someday
|
|
||||||
|
|
||||||
subprojects {
|
|
||||||
apply {
|
|
||||||
plugin("java-library")
|
|
||||||
plugin("io.freefair.lombok")
|
|
||||||
}
|
|
||||||
|
|
||||||
when (this) {
|
|
||||||
in deployProjects -> plugins.apply("floodgate.publish-conventions")
|
|
||||||
else -> plugins.apply("floodgate.base-conventions")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this in shadowProjects) {
|
|
||||||
plugins.apply("floodgate.shadow-conventions")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,8 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation(libs.lombok)
|
||||||
|
implementation(libs.micronaut)
|
||||||
implementation(libs.indra.common)
|
implementation(libs.indra.common)
|
||||||
implementation(libs.indra.git)
|
implementation(libs.indra.git)
|
||||||
implementation(libs.indra.licenser.spotless)
|
implementation(libs.indra.licenser.spotless)
|
||||||
|
|||||||
@@ -5,8 +5,14 @@ plugins {
|
|||||||
id("net.kyori.indra.git")
|
id("net.kyori.indra.git")
|
||||||
// id("net.kyori.indra.licenser.spotless")
|
// id("net.kyori.indra.licenser.spotless")
|
||||||
id("floodgate.depsize")
|
id("floodgate.depsize")
|
||||||
|
id("io.freefair.lombok")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val rootProperties: Map<String, *> = project.rootProject.properties
|
||||||
|
group = rootProperties["group"] as String + "." + rootProperties["id"] as String
|
||||||
|
version = if (shouldAddBranchName()) versionWithBranchName() else rootProperties["version"] as String
|
||||||
|
description = rootProperties["description"] as String
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("org.checkerframework", "checker-qual", "3.19.0")
|
compileOnly("org.checkerframework", "checker-qual", "3.19.0")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
plugins {
|
||||||
|
id("floodgate.shadow-conventions")
|
||||||
|
id("floodgate.publish-conventions")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.coreNetty4)
|
api(projects.coreNetty4)
|
||||||
annotationProcessor(projects.coreNetty4)
|
annotationProcessor(projects.coreNetty4)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
id("floodgate.base-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
|
id("floodgate.publish-conventions")
|
||||||
id("floodgate.generate-templates")
|
id("floodgate.generate-templates")
|
||||||
id("floodgate.dependency-hash")
|
id("floodgate.dependency-hash")
|
||||||
|
id("floodgate.shadow-conventions")
|
||||||
id("io.micronaut.library")
|
id("io.micronaut.library")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
plugins {
|
||||||
|
id("floodgate.publish-conventions")
|
||||||
|
id("floodgate.shadow-conventions")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.coreCommon)
|
api(projects.coreCommon)
|
||||||
annotationProcessor(projects.coreCommon)
|
annotationProcessor(projects.coreCommon)
|
||||||
|
|||||||
@@ -2,5 +2,8 @@ org.gradle.configureondemand=true
|
|||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|
||||||
|
group=org.geysermc
|
||||||
|
id=floodgate
|
||||||
|
description="Allows Bedrock players to join Java edition servers while keeping the server in online mode"
|
||||||
version=3.0.0-SNAPSHOT
|
version=3.0.0-SNAPSHOT
|
||||||
micronautVersion=4.6.0
|
micronautVersion=4.6.0
|
||||||
@@ -110,10 +110,8 @@ indra-git = { module = "net.kyori:indra-git", version.ref = "indra" }
|
|||||||
indra-licenser-spotless = { module = "net.kyori:indra-licenser-spotless", version.ref = "indra" }
|
indra-licenser-spotless = { module = "net.kyori:indra-licenser-spotless", version.ref = "indra" }
|
||||||
shadow = { group = "com.gradleup.shadow", name = "com.gradleup.shadow.gradle.plugin", version.ref = "shadow" }
|
shadow = { group = "com.gradleup.shadow", name = "com.gradleup.shadow.gradle.plugin", version.ref = "shadow" }
|
||||||
gradle-idea-ext = { module = "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext", version.ref = "gradle-idea-ext" }
|
gradle-idea-ext = { module = "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext", version.ref = "gradle-idea-ext" }
|
||||||
|
lombok = { group = "io.freefair.gradle", name = "lombok-plugin", version.ref = "lombok" }
|
||||||
[plugins]
|
micronaut = { group = "io.micronaut.library", name = "io.micronaut.library.gradle.plugin", version.ref = "micronaut-gradle" }
|
||||||
micronaut = { id = "io.micronaut.library", version.ref = "micronaut-gradle" }
|
|
||||||
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
|
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
fastutil = ["fastutil-short-object-maps", "fastutil-int-object-maps"]
|
fastutil = ["fastutil-short-object-maps", "fastutil-int-object-maps"]
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("floodgate.base-conventions")
|
id("floodgate.publish-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
plugins {
|
||||||
|
id("floodgate.publish-conventions")
|
||||||
|
id("floodgate.shadow-conventions")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.coreNetty4)
|
api(projects.coreNetty4)
|
||||||
annotationProcessor(projects.coreNetty4)
|
annotationProcessor(projects.coreNetty4)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
id("floodgate.base-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
|
id("floodgate.publish-conventions")
|
||||||
id("floodgate.generate-templates")
|
id("floodgate.generate-templates")
|
||||||
|
id("floodgate.shadow-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
provided(libs.bungee)
|
provided(libs.bungee)
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
plugins {
|
||||||
|
id("floodgate.publish-conventions")
|
||||||
|
id("floodgate.shadow-conventions")
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.coreNetty4)
|
api(projects.coreNetty4)
|
||||||
annotationProcessor(projects.coreNetty4)
|
annotationProcessor(projects.coreNetty4)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
id("floodgate.base-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
Reference in New Issue
Block a user