-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
121 lines (99 loc) · 3.53 KB
/
build.gradle
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
import net.fabricmc.loom.task.RemapJarTask
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
id 'io.github.goooler.shadow' version "8.1.8"
}
version = project.mod_version
group = project.maven_group
repositories {
maven { url 'https://maven.fabricmc.net' }
maven { url "https://maven.kyrptonaught.dev" }
maven { url "https://maven.terraformersmc.com/releases" }
maven { url "https://maven.nucleoid.xyz/" }
maven { url "https://api.modrinth.com/maven"; content { includeGroup "maven.modrinth" } }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://masa.dy.fi/maven" }
maven { url "https://repo.opencollab.dev/main/" }
maven { url 'https://maven.lenni0451.net/snapshots'}
mavenCentral()
}
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_version}")
//SGui
modImplementation include("eu.pb4:sgui:1.6.0+1.21") { exclude group: "net.fabricmc.fabric-api" }
//Fantasy
modImplementation include('xyz.nucleoid:fantasy:0.6.3+1.21') { exclude group: "net.fabricmc.fabric-api" }
//Luck Perms
modImplementation('maven.modrinth:luckperms:v5.4.133-fabric') { exclude group: "net.fabricmc.fabric-api" }
modImplementation('me.lucko:fabric-permissions-api:0.3.1') { exclude group: "net.fabricmc.fabric-api" }
compileOnly 'net.luckperms:api:5.4'
modImplementation "com.moandjiezana.toml:toml4j:0.7.2"
//carpet
modImplementation('carpet:fabric-carpet:1.21-1.4.147+v240613') { exclude group: "net.fabricmc.fabric-api" }
//NoChatReports
modImplementation('maven.modrinth:no-chat-reports:Fabric-1.21-v2.8.0') { exclude group: "net.fabricmc.fabric-api" }
//NBS
modImplementation include("net.kyrptonaught:NoteBlockPlayer:0.0.2") { exclude group: "net.fabricmc.fabric-api" }
implementation include('net.raphimc:NoteBlockLib:2.1.3');
//Discord Bridge
shadow implementation("net.dv8tion:JDA:5.0.0-beta.24") { exclude module: 'opus-java' }
//Javalin
shadow implementation("io.javalin:javalin:6.1.6")
}
loom {
accessWidenerPath = file("src/main/resources/serverutils.accesswidener")
}
configurations {
// Determines shaded dependencies
shade
developmentElements {
extendsFrom(implementation, namedElements)
}
}
shadowJar {
minimize()
// Store in temporary folder instead of outputting directly
destinationDirectory = file("${buildDir}/tmp/allJar")
// Only shade dependencies not provided by Minecraft/FAPI/FLoader
configurations = [project.configurations.shadow]
relocate 'okhttp3', 'net.dv8tion.shaded.okhttp3'
relocate 'okio' , 'net.dv8tion.shaded.okio'
//Exclude META-INF entries of shaded deps
exclude('META-INF/**')
// include() upsets shadow, so use from() instead
from('LICENSE.md', 'NOTICE.txt')
from('licenses') {
into('licenses')
}
}
remapJar {
dependsOn(shadowJar)
inputFile = tasks.shadowJar.archiveFile
}
base {
archivesName = project.archives_base_name
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
jar {
// Store in temporary folder instead of outputting directly
destinationDirectory = file("${buildDir}/tmp/thinJar")
from("LICENSE") {
rename { "${it}_${base.archivesName.get()}"}
}
}