2022-10-03 22:11:07 +02:00
|
|
|
plugins {
|
2022-10-05 00:18:53 +02:00
|
|
|
id("fabric-loom") version "1.0-SNAPSHOT"
|
2023-03-20 18:04:53 +01:00
|
|
|
id("com.modrinth.minotaur") version "2.+"
|
2022-10-03 22:11:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
//to change the versions see the gradle.properties file
|
2022-10-17 23:08:52 +02:00
|
|
|
minecraft(libs.fabric.minecraft)
|
2022-10-18 18:06:18 +02:00
|
|
|
mappings(loom.officialMojangMappings())
|
2022-10-17 23:08:52 +02:00
|
|
|
modImplementation(libs.fabric.loader)
|
2022-10-03 22:11:07 +02:00
|
|
|
|
|
|
|
// Fabric API. This is technically optional, but you probably want it anyway.
|
2022-10-17 23:08:52 +02:00
|
|
|
modImplementation(libs.fabric.api)
|
2022-10-03 22:11:07 +02:00
|
|
|
|
2022-10-24 19:21:02 +02:00
|
|
|
// This should be in the libs TOML, but something about modImplementation AND include just doesn't work
|
|
|
|
include(modImplementation("me.lucko", "fabric-permissions-api", "0.2-SNAPSHOT"))
|
|
|
|
|
2022-10-03 22:11:07 +02:00
|
|
|
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
|
|
|
// You may need to force-disable transitiveness on them.
|
|
|
|
|
|
|
|
api(projects.core)
|
|
|
|
shadow(projects.core) {
|
|
|
|
exclude(group = "com.google.guava", module = "guava")
|
|
|
|
exclude(group = "com.google.code.gson", module = "gson")
|
|
|
|
exclude(group = "org.slf4j")
|
|
|
|
exclude(group = "com.nukkitx.fastutil")
|
|
|
|
exclude(group = "io.netty.incubator")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
maven("https://repo.opencollab.dev/maven-releases/")
|
|
|
|
maven("https://repo.opencollab.dev/maven-snapshots/")
|
|
|
|
maven("https://jitpack.io")
|
|
|
|
maven("https://oss.sonatype.org/content/repositories/snapshots/")
|
|
|
|
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
|
|
|
}
|
|
|
|
|
2022-10-17 04:47:26 +02:00
|
|
|
application {
|
2022-10-17 23:08:52 +02:00
|
|
|
mainClass.set("org.geysermc.geyser.platform.fabric.GeyserFabricMain")
|
2022-10-17 04:47:26 +02:00
|
|
|
}
|
|
|
|
|
2022-10-03 22:11:07 +02:00
|
|
|
tasks {
|
|
|
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
|
|
|
// if it is present.
|
|
|
|
// If you remove this task, sources will not be generated.
|
|
|
|
sourcesJar {
|
|
|
|
archiveClassifier.set("sources")
|
|
|
|
from(sourceSets.main.get().allSource)
|
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
2022-10-17 04:47:26 +02:00
|
|
|
// Mirrors the example fabric project, otherwise tons of dependencies are shaded that shouldn't be
|
|
|
|
configurations = listOf(project.configurations.shadow.get())
|
|
|
|
// The remapped shadowJar is the final desired Geyser-Fabric.jar
|
|
|
|
archiveVersion.set(project.version.toString())
|
|
|
|
archiveClassifier.set("shaded")
|
|
|
|
|
2022-10-03 22:11:07 +02:00
|
|
|
relocate("org.objectweb.asm", "org.geysermc.relocate.asm")
|
|
|
|
relocate("org.yaml", "org.geysermc.relocate.yaml") // https://github.com/CardboardPowered/cardboard/issues/139
|
|
|
|
relocate("com.fasterxml.jackson", "org.geysermc.relocate.jackson")
|
|
|
|
relocate("net.kyori", "org.geysermc.relocate.kyori")
|
2023-03-22 16:10:04 +01:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// Exclude everything EXCEPT KQueue and some DNS stuff required for HAProxyc
|
|
|
|
exclude(dependency("io.netty:netty-transport-classes-epoll:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-transport-native-epoll:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-transport-native-unix-common:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-transport-native-kqueue:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-handler:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-common:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-buffer:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-resolver:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-transport:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-codec:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-resolver-dns:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-resolver-dns-native-macos:.*"))
|
|
|
|
}
|
2022-10-03 22:11:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
remapJar {
|
|
|
|
dependsOn(shadowJar)
|
2022-10-05 00:18:53 +02:00
|
|
|
inputFile.set(shadowJar.get().archiveFile)
|
2022-10-03 22:11:07 +02:00
|
|
|
archiveBaseName.set("Geyser-Fabric")
|
|
|
|
archiveClassifier.set("")
|
|
|
|
archiveVersion.set("")
|
|
|
|
}
|
2023-03-20 18:04:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
modrinth {
|
2023-03-30 21:27:00 +02:00
|
|
|
token.set(System.getenv("MODRINTH_TOKEN")) // Even though this is the default value, apparently this prevents GitHub Actions caching the token?
|
2023-03-20 18:04:53 +01:00
|
|
|
projectId.set("wKkoqHrH")
|
|
|
|
versionNumber.set(project.version as String + "-" + System.getenv("GITHUB_RUN_NUMBER"))
|
|
|
|
versionType.set("beta")
|
|
|
|
changelog.set("A changelog can be found at https://github.com/GeyserMC/Geyser/commits")
|
|
|
|
|
|
|
|
syncBodyFrom.set(rootProject.file("README.md").readText())
|
|
|
|
|
|
|
|
uploadFile.set(tasks.getByPath("remapJar"))
|
|
|
|
gameVersions.addAll("1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4")
|
|
|
|
|
|
|
|
loaders.add("fabric")
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
required.project("fabric-api")
|
|
|
|
}
|
2022-10-03 22:11:07 +02:00
|
|
|
}
|