forked from BRForgers/DisFabric
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
127 lines (109 loc) · 4.7 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
plugins {
id("fabric-loom") version "1.0.+"
id("maven-publish")
id("project-report")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
val archives_base_name: String by project
val minecraft_version: String by project
val mod_version: String by project
val maven_group: String by project
val yarn_mappings: String by project
val loader_version: String by project
val fabric_version: String by project
val archivesBaseName = "$archives_base_name-$minecraft_version"
version = mod_version
group = maven_group
repositories {
maven("https://api.modrinth.com/maven") {
name = "Modrinth"
mavenContent {
includeGroup("maven.modrinth")
}
}
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots") { name = "OSS Sonatype Snapshots" }
maven("https://maven.fabricmc.net/") { name = "Fabric" }
maven("https://maven.the-glitch.network") { name = "The Glitch" }
maven("https://maven.nucleoid.xyz") { name = "NucleoidMC" }
maven("https://maven.shedaniel.me/")
maven("https://jitpack.io/") {
name = "JitPack"
mavenContent {
includeGroupByRegex("com\\.github\\..*")
}
}
}
dependencies {
val excludeFabricApi = Action<ExternalModuleDependency> {
exclude(group = "net.fabricmc.fabric-api", module = "fabric-api")
}
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings("net.fabricmc:yarn:${yarn_mappings}:v2")
modImplementation("net.fabricmc:fabric-loader:${loader_version}")
modImplementation("net.fabricmc.fabric-api", "fabric-api", fabric_version) {
exclude(module = "fabric-gametest-api-v1")
}
// Markdown
implementation("org.commonmark:commonmark:0.18.1")
modImplementation("dev.gegy:markdown-chat:1.3.0", excludeFabricApi)
// Fabric Tailor
modImplementation("com.github.samolego.Config2Brigadier:config2brigadier-fabric:1.2.3", excludeFabricApi)
modImplementation("maven.modrinth:fabrictailor:2.0.2")
// modRuntimeOnly("maven.modrinth:drogtor:1.1.3+1.19")
include(modImplementation("fr.catcore:server-translations-api:1.4.19+1.19.3", excludeFabricApi))
modRuntimeOnly("net.fabricmc:fabric-language-kotlin:1.8.7+kotlin.1.7.22")
include(implementation("net.dv8tion:JDA:5.0.0-beta.2") {
exclude(module = "opus-java")
})
modImplementation("maven.modrinth:vanish:1.3.2") {
excludeFabricApi(this)
isTransitive = false
}
// JIJ is useless, why; required for Vanish
modRuntimeOnly("eu.pb4:player-data-api:0.2.1+1.19")
modRuntimeOnly("eu.pb4:placeholder-api:2.0.0-beta.7+1.19")
modRuntimeOnly("com.github.LlamaLad7:MixinExtras:0.1.1")
modRuntimeOnly("me.lucko:fabric-permissions-api:0.2-SNAPSHOT")
include(modApi("me.sargunvohra.mcmods:autoconfig1u:3.3.1", excludeFabricApi))
include(implementation("com.konghq:unirest-java:3.13.10:standalone") {
exclude(group = "com.google.code.gson", module = "gson")
exclude(group = "org.apache.httpcomponents", module = "httpclient")
exclude(group = "commons-logging", module = "commons-logging")
})
include(implementation("net.sf.trove4j", "trove4j", "3.0.3"))
include(implementation("org.apache.commons", "commons-collections4", "4.4"))
include(implementation("com.neovisionaries", "nv-websocket-client", "2.14"))
include(implementation("com.squareup.okhttp3", "okhttp", "4.10.0"))
include(implementation("com.fasterxml.jackson.core", "jackson-annotations", "2.14.1"))
include(implementation("com.fasterxml.jackson.core", "jackson-databind", "2.14.1"))
include(implementation("com.fasterxml.jackson.core", "jackson-core", "2.14.1"))
include(implementation("com.fasterxml.jackson", "jackson-bom", "2.14.1"))
include(implementation("com.squareup.okio", "okio", "3.2.0"))
include(implementation("com.squareup.okio", "okio-jvm", "3.2.0"))
include(implementation("com.neovisionaries", "nv-websocket-client", "2.14"))
}
tasks {
processResources {
inputs.property("version", version)
filesMatching("fabric.mod.json") {
expand("version" to version)
}
}
withType<JavaCompile> {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
options.encoding = "UTF-8"
}
jar {
from("LICENSE") {
rename { "${it}_${archivesBaseName}" }
}
}
}