mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-19 14:59:20 +00:00
Fixed building
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
object Versions {
|
object Versions {
|
||||||
const val geyserVersion = "2.0.3-SNAPSHOT"
|
const val geyserVersion = "2.0.4-SNAPSHOT"
|
||||||
const val cumulusVersion = "1.1"
|
const val cumulusVersion = "1.1"
|
||||||
const val configUtilsVersion = "1.0-SNAPSHOT"
|
const val configUtilsVersion = "1.0-SNAPSHOT"
|
||||||
const val spigotVersion = "1.13-R0.1-SNAPSHOT"
|
const val spigotVersion = "1.13-R0.1-SNAPSHOT"
|
||||||
|
|||||||
@@ -52,19 +52,23 @@ fun Project.buildNumber(): Int =
|
|||||||
fun Project.buildNumberAsString(): String =
|
fun Project.buildNumberAsString(): String =
|
||||||
buildNumber().takeIf { it != -1 }?.toString() ?: "??"
|
buildNumber().takeIf { it != -1 }?.toString() ?: "??"
|
||||||
|
|
||||||
val providedDependencies = mutableMapOf<String, MutableSet<String>>()
|
val providedDependencies = mutableMapOf<String, MutableSet<Pair<String, Any>>>()
|
||||||
val relocatedPackages = mutableMapOf<String, MutableSet<String>>()
|
val relocatedPackages = mutableMapOf<String, MutableSet<String>>()
|
||||||
|
|
||||||
fun Project.provided(pattern: String, name: String, version: String, excludedOn: Int = 0b110) {
|
fun Project.provided(pattern: String, name: String, version: String, excludedOn: Int = 0b110) {
|
||||||
providedDependencies.getOrPut(project.name) { mutableSetOf() }
|
val format = "${calcExclusion(pattern, 0b100, excludedOn)}:" +
|
||||||
.add("${calcExclusion(pattern, 0b100, excludedOn)}:" +
|
"${calcExclusion(name, 0b10, excludedOn)}:" +
|
||||||
"${calcExclusion(name, 0b10, excludedOn)}:" +
|
calcExclusion(version, 0b1, excludedOn)
|
||||||
calcExclusion(version, 0b1, excludedOn))
|
|
||||||
|
providedDependencies.getOrPut(project.name) { mutableSetOf() }.add(Pair(format, format))
|
||||||
dependencies.add("compileOnlyApi", "$pattern:$name:$version")
|
dependencies.add("compileOnlyApi", "$pattern:$name:$version")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Project.provided(dependency: ProjectDependency) =
|
fun Project.provided(dependency: ProjectDependency) {
|
||||||
provided(dependency.group!!, dependency.name, dependency.version!!)
|
providedDependencies.getOrPut(project.name) { mutableSetOf() }
|
||||||
|
.add(Pair(dependency.group + ":" + dependency.name, dependency))
|
||||||
|
dependencies.add("compileOnlyApi", dependency)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fun Project.relocate(pattern: String) =
|
fun Project.relocate(pattern: String) =
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ tasks {
|
|||||||
val sJar: ShadowJar = this
|
val sJar: ShadowJar = this
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
providedDependencies[project.name]?.forEach { string ->
|
providedDependencies[project.name]?.forEach { (name, notation) ->
|
||||||
sJar.dependencies {
|
sJar.dependencies {
|
||||||
println("Excluding $string from ${project.name}")
|
println("Excluding $name from ${project.name}")
|
||||||
exclude(dependency(string))
|
exclude(dependency(notation))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user