ViaFabricPlus/build.gradle

151 lines
3.9 KiB
Groovy
Raw Normal View History

2023-02-19 23:17:33 +01:00
plugins {
2023-07-28 20:03:04 +02:00
id "fabric-loom" version "1.3-SNAPSHOT"
2023-06-01 16:13:57 +02:00
id "maven-publish"
2023-02-19 23:17:33 +01:00
}
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
2023-02-21 04:24:49 +01:00
configurations {
2023-05-15 20:27:07 +02:00
api.extendsFrom library
include.extendsFrom jij
implementation.extendsFrom jij
2023-02-21 04:24:49 +01:00
}
allprojects {
repositories {
mavenCentral()
maven {
name = "Jitpack"
url = "https://jitpack.io"
}
maven {
name = "ViaVersion"
url = "https://repo.viaversion.com"
}
2023-03-03 16:40:38 +01:00
maven {
2023-03-10 18:39:52 +01:00
name = "Lenni0451 releases"
2023-03-03 16:47:32 +01:00
url = "https://maven.lenni0451.net/releases"
2023-03-03 16:40:38 +01:00
}
2023-03-10 18:39:52 +01:00
maven {
name = "Lenni0451 snapshots"
url = "https://maven.lenni0451.net/snapshots"
}
maven {
2023-03-03 16:47:32 +01:00
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/releases"
}
2023-03-14 21:07:55 +01:00
maven {
name = "OpenCollab Snapshots"
url = "https://repo.opencollab.dev/maven-snapshots/"
}
2023-02-19 23:17:33 +01:00
}
}
loom {
accessWidenerPath = file("src/main/resources/viafabricplus.accesswidener")
}
2023-02-19 23:17:33 +01:00
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
2023-03-03 16:47:32 +01:00
2023-02-19 23:17:33 +01:00
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
2023-03-15 00:47:06 +01:00
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
2023-07-01 15:26:58 +02:00
modApi "com.terraformersmc:modmenu:${project.mod_menu_version}"
2023-02-19 23:17:33 +01:00
2023-07-01 15:26:58 +02:00
library "de.florianmichael:Classic4J:${project.classic4j_version}"
2023-02-19 23:17:33 +01:00
2023-05-15 20:27:07 +02:00
library "com.viaversion:viaversion:${project.viaversion_version}"
library ("com.viaversion:viabackwards-common:${project.viabackwards_version}") {
2023-05-13 21:06:19 +02:00
exclude group: "com.viaversion", module: "viaversion"
exclude group: "io.netty", module: "netty-all"
exclude group: "com.google.guava", module: "guava"
}
2023-02-19 23:17:33 +01:00
library ("net.raphimc:ViaLoader:${project.vialoader_version}") {
exclude group: "org.slf4j", module: "slf4j-api"
}
2023-05-15 20:27:07 +02:00
library ("net.raphimc:ViaLegacy:${project.vialegacy_version}") {
2023-06-16 19:14:18 +02:00
exclude group: "com.google.code.gson", module: "gson"
2023-05-09 16:29:11 +02:00
}
2023-05-15 20:27:07 +02:00
library "net.raphimc:ViaAprilFools:${project.viaaprilfools_version}"
library ("net.raphimc:ViaBedrock:${project.viabedrock_version}") {
2023-05-09 16:29:11 +02:00
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"
}
2023-05-15 20:27:07 +02:00
library ("net.raphimc:MinecraftAuth:${project.minecraftauth_version}") {
exclude group: "com.google.code.gson", module: "gson"
exclude group: "org.slf4j", module: "slf4j-api"
}
2023-05-15 20:27:07 +02:00
library("org.cloudburstmc.netty:netty-transport-raknet:${project.raknet_transport_version}") {
2023-05-09 16:29:11 +02:00
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}"
2023-03-15 00:47:06 +01:00
2023-05-15 20:27:07 +02:00
include implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${project.mixin_extras_version}"))
2023-02-19 23:17:33 +01:00
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
withSourcesJar()
2023-04-11 18:35:23 +02:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2023-02-19 23:17:33 +01:00
}
jar {
2023-05-15 20:27:07 +02:00
dependsOn configurations.library
2023-02-21 04:24:49 +01:00
from {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
2023-05-15 20:27:07 +02:00
configurations.library.collect {
2023-02-21 04:24:49 +01:00
zipTree(it)
}
} {
exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA"
}
from("LICENSE") { rename { "${it}_${project.archivesBaseName}" } }
2023-02-19 23:17:33 +01:00
}
2023-06-01 16:13:57 +02:00
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
}
}
2023-06-16 19:14:18 +02:00
}