mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-29 13:06:00 +01:00
122 lines
3.5 KiB
Groovy
122 lines
3.5 KiB
Groovy
plugins {
|
|
id "fabric-loom" version "1.1-SNAPSHOT"
|
|
}
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
archivesBaseName = project.archives_base_name
|
|
version = project.mod_version
|
|
group = project.maven_group
|
|
|
|
configurations {
|
|
implementation.extendsFrom libs
|
|
api.extendsFrom libs
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "Jitpack"
|
|
url = "https://jitpack.io"
|
|
}
|
|
maven {
|
|
name = "ViaVersion"
|
|
url = "https://repo.viaversion.com"
|
|
}
|
|
maven {
|
|
name = "Lenni0451 releases"
|
|
url = "https://maven.lenni0451.net/releases"
|
|
}
|
|
maven {
|
|
name = "Lenni0451 snapshots"
|
|
url = "https://maven.lenni0451.net/snapshots"
|
|
}
|
|
maven {
|
|
name = "TerraformersMC"
|
|
url = "https://maven.terraformersmc.com/releases"
|
|
}
|
|
maven {
|
|
name = "OpenCollab Snapshots"
|
|
url = "https://repo.opencollab.dev/maven-snapshots/"
|
|
}
|
|
}
|
|
}
|
|
|
|
loom {
|
|
accessWidenerPath = file("src/main/resources/viafabricplus.accesswidener")
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
|
|
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
|
|
|
libs "com.github.FlorianMichael:ViaLoadingBase:${project.vialoadingbase_version}"
|
|
libs("org.cloudburstmc.netty:netty-transport-raknet:${project.raknet_transport_version}") {
|
|
exclude group: "io.netty", module: "netty-common"
|
|
exclude group: "io.netty", module: "netty-buffer"
|
|
exclude group: "io.netty", module: "netty-codec"
|
|
exclude group: "io.netty", module: "netty-transport"
|
|
}
|
|
|
|
libs "com.viaversion:viaversion:${project.viaversion_version}"
|
|
libs "com.viaversion:viabackwards-common:${project.viabackwards_version}"
|
|
libs "org.yaml:snakeyaml:${project.snake_yml_version}"
|
|
|
|
libs "net.raphimc:ViaLegacy:${project.vialegacy_version}"
|
|
libs "net.raphimc:ViaAprilFools:${project.viaaprilfools_version}"
|
|
|
|
libs ("net.raphimc:ViaBedrock:${project.viabedrock_version}") {
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-api"
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-impl"
|
|
exclude group: "io.jsonwebtoken", module: "jjwt-gson"
|
|
}
|
|
libs "io.netty:netty-codec-http:${project.netty_codec_http_version}" // Some people don't know how to define dependencies properly in a build.gradle
|
|
libs ("net.raphimc:MinecraftAuth:${project.minecraftauth_version}") {
|
|
exclude group: "com.google.code.gson", module: "gson"
|
|
exclude group: "org.slf4j", module: "slf4j-api"
|
|
}
|
|
|
|
libs "net.lenni0451.mcstructs:text:${project.mcstructs_text_version}"
|
|
libs "net.lenni0451:Reflect:${project.reflect_version}"
|
|
|
|
libs "com.github.allinkdev:BetacraftServerListParser:${project.betacraft_version}"
|
|
|
|
modImplementation "com.terraformersmc:modmenu:${project.mod_menu_version}"
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
it.options.release = 17
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
}
|
|
|
|
jar {
|
|
dependsOn configurations.libs
|
|
from {
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
configurations.libs.collect {
|
|
zipTree(it)
|
|
}
|
|
} {
|
|
exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA"
|
|
}
|
|
from("LICENSE") { rename { "${it}_${project.archivesBaseName}" } }
|
|
from("LICENSE_multiconnect") { rename { "${it}_${project.archivesBaseName}" } }
|
|
from("LICENSE_GENERAL_MIT") { rename { "${it}_${project.archivesBaseName}" } }
|
|
}
|