ViaFabricPlus/build.gradle
Kichura 253e0f7c2f
Gradle 8.3 and other dependency updates. (#259)
* Gradle 8.3 and other dependency updates.

* Update Classic4J to 1.2.1.

* Revert "Update Classic4J to 1.2.1".

This dependency has failed the CI building test and therefore will be reverted, Also the dependency has changed internal classes and therefore will not work with VFP at this time.

* Revert 3 dependencies as requested.

ViaVersion and Netty updates cause ViaBedrock + ViaLegacy to break and Reflect 1.3.0-SNAPSHOT is marked as not ready.
2023-10-02 01:03:39 +02:00

151 lines
3.9 KiB
Groovy

plugins {
id "fabric-loom" version "1.4-SNAPSHOT"
id "maven-publish"
}
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
configurations {
api.extendsFrom library
include.extendsFrom jij
implementation.extendsFrom jij
}
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}"
modApi "com.terraformersmc:modmenu:${project.mod_menu_version}"
library "de.florianmichael:Classic4J:${project.classic4j_version}"
library "com.viaversion:viaversion:${project.viaversion_version}"
library ("com.viaversion:viabackwards-common:${project.viabackwards_version}") {
exclude group: "com.viaversion", module: "viaversion"
exclude group: "io.netty", module: "netty-all"
exclude group: "com.google.guava", module: "guava"
}
library ("net.raphimc:ViaLoader:${project.vialoader_version}") {
exclude group: "org.slf4j", module: "slf4j-api"
}
library ("net.raphimc:ViaLegacy:${project.vialegacy_version}") {
exclude group: "com.google.code.gson", module: "gson"
}
library "net.raphimc:ViaAprilFools:${project.viaaprilfools_version}"
library ("net.raphimc:ViaBedrock:${project.viabedrock_version}") {
exclude group: "net.lenni0451.mcstructs", module: "text"
exclude group: "io.jsonwebtoken", module: "jjwt-impl"
exclude group: "io.jsonwebtoken", module: "jjwt-gson"
exclude group: "com.mojang", module: "brigadier"
}
library ("net.raphimc:MinecraftAuth:${project.minecraftauth_version}") {
exclude group: "com.google.code.gson", module: "gson"
exclude group: "org.slf4j", module: "slf4j-api"
}
library("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"
}
jij "net.lenni0451:Reflect:${project.reflect_version}"
include implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${project.mixin_extras_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()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
dependsOn configurations.library
from {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations.library.collect {
zipTree(it)
}
} {
exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA"
}
from("LICENSE") { rename { "${it}_${project.archivesBaseName}" } }
}
publishing {
repositories {
maven {
name = "Via"
url = "https://repo.viaversion.com/"
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
publications {
maven(MavenPublication) {
groupId = project.maven_group
artifactId = project.archives_base_name
version = project.mod_version
from components.java
}
}
}