-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.gradle
59 lines (52 loc) · 2.18 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
import com.ishland.c2me.gradle.RedirectingOutputStream
evaluationDependsOn(":tests")
evaluationDependsOn(":tests:test-mod")
sourceSets {
testmod {
compileClasspath += main.compileClasspath
runtimeClasspath += main.runtimeClasspath
}
}
loom {
runs {
testC2MEAOFServer {
server()
runDir getRootProject().getProjectDir().toPath().relativize(project.getBuildDir().toPath()).resolve("testServer").toString()
source sourceSets.testmod
vmArgs "-Dcom.ishland.c2me.common.config.threadedWorldGen.reduceLockRadius=true",
"-Dcom.ishland.c2me.common.config.threadedWorldGen.enabled=true",
"-Dcom.ishland.c2me.common.config.threadedWorldGen.useGlobalBiomeCache=true",
"-Dcom.ishland.c2me.common.config.asyncScheduling.enabled=true",
"-Dcom.ishland.c2me.common.config.noTickViewDistance.enabled=true",
"--add-modules jdk.incubator.vector",
"-Dmixin.debug.export=true"
if (System.getenv("GITHUB_WORKFLOW") != null) {
if (System.getenv("RUNNER_OS").equals("macOS")) {
vmArgs "-Xmx11G"
} else if (System.getenv("RUNNER_OS").equals("Linux")) {
vmArgs "-Xmx5G"
}
}
}
}
}
runTestC2MEAOFServer.configure {
doFirst {
standardOutput = new RedirectingOutputStream(project, getName())
}
onlyIf {
!getRootProject().getProjectDir().toPath().relativize(project.getBuildDir().toPath()).resolve("testServer").toFile().isDirectory()
}
}
migrateMappings.onlyIf { false }
dependencies {
testmodImplementation project(":tests:test-mod").sourceSets.main.output
testmodImplementation project(":").sourceSets.main.output
testmodImplementation project(":").configurations.getByName("includeApi").allDependencies
testmodImplementation project(":").configurations.getByName("shadowImpl").allDependencies
testmodImplementation project(":").configurations.getByName("shadowRuntime").allDependencies
curseforgeModpack "curse.modpack:486691:3487730"
}
test {
useJUnitPlatform()
}