-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
98 lines (79 loc) · 2.7 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
plugins {
// loom plugin
id 'fabric-loom' version "${loom_version}"
// legacy looming (loom plugin improvements)
id 'legacy-looming' version "${loom_version}"
}
// set basic properties
version = project.version
group = project.group
// compile for java 8
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
loom {
// set access widener
accessWidenerPath = file('src/main/resources/tasmod.accesswidener')
// add log4jconfig
log4jConfigs.from(file('src/main/resources/log4j.xml'))
}
// dependency repositories
repositories {
mavenCentral()
maven { url = 'https://raw.githubusercontent.com/BleachDev/cursed-mappings/main/' }
maven { url = "https://jitpack.io" }
maven { url = "https://maven.mgnet.work/main" }
maven { url = 'https://repo.spongepowered.org/maven' }
}
// dependency configurations
configurations {
// non-transitive download mod dependency
downloadMod.transitive = false
// embed dependency included in build
implementation.extendsFrom(embed)
}
// dependencies
dependencies {
// tasmod dependencies
embed group: 'com.dselent', name: 'bigarraylist', version: '1.1'
//compileOnly group: 'com.minecrafttas', name: 'killtherng', version: '2.0'
//downloadMod group: 'com.minecrafttas', name: 'killtherng-full', version: '2.0' // for downloadKTRNG task
// loom dependencies
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.legacyfabric:yarn:${project.minecraft_version}+build.mcp"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
}
// task for downloading KillTheRng
//task downloadKTRNG(type: Copy) {
//group 'tasmod'
//description 'Download KillTheRNG to the run/mods/ folder of the project'
//from configurations.downloadMod
//into 'run/mods/'
//}
compileJava{
options.release = 8
}
// process fabric mod json
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft_version
filesMatching("fabric.mod.json") {
expand 'mod_url': project.mod_url, 'name': project.mod_name, 'mod_version': project.version, 'mod_description': project.mod_description, 'mod_sources': project.mod_sources, 'mod_email': project.mod_email
}
}
// configure jar file
jar {
archivesBaseName = project.artifact
// pack embedded stuff
from {
configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "LICENSE.txt", "META-INF/MANIFSET.MF", "META-INF/maven/**", "META-INF/*.RSA", "META-INF/*.SF"
}
}
// configure testing
tasks.named('test', Test) {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}