forked from FabricMC/fabric-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
58 lines (49 loc) · 1.78 KB
/
build.gradle
File metadata and controls
58 lines (49 loc) · 1.78 KB
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
def minecraftVersion = "1.21.11"
def fabricApiVersion = "0.141.1+1.21.11"
// :::automatic-testing:game-test:2
dependencies {
// :::automatic-testing:game-test:2
minecraft "com.mojang:minecraft:${minecraftVersion}"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}"
// :::automatic-testing:game-test:2
productionRuntimeMods "net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}"
}
// :::classtweaker-setup:gradle:::
loom {
// :::classtweaker-setup:gradle:::
// :::classtweaker-setup:gradle:::
accessWidenerPath = file("src/main/resources/example-mod.classtweaker")
// :::classtweaker-setup:gradle:::
// :::classtweaker-setup:gradle:::
}
// :::classtweaker-setup:gradle:::
// :::automatic-testing:game-test:2
// :::automatic-testing:2
test {
useJUnitPlatform()
}
// :::automatic-testing:2
// :::debug-logging
loom.log4jConfigs.from "log4j-dev.xml"
// :::debug-logging
// :::automatic-testing:game-test:1
fabricApi {
configureTests {
createSourceSet = true
modId = "example-mod-test-${project.name}"
enableGameTests = true // Default is true
enableClientGameTests = true // Default is true
eula = true // By setting this to true, you agree to the Minecraft EULA.
}
}
// :::automatic-testing:game-test:1
// :::automatic-testing:game-test:2
tasks.register("runProductionClientGameTest", net.fabricmc.loom.task.prod.ClientProductionRunTask) {
jvmArgs.add("-Dfabric.client.gametest")
// Whether to use XVFB to run the game, using a virtual framebuffer. This is useful for headless CI environments.
// Defaults to true only on Linux and when the "CI" environment variable is set.
// XVFB must be installed, on Debian-based systems you can install it with: `apt install xvfb`
useXVFB = true
}
// :::automatic-testing:game-test:2