-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.gradle
49 lines (42 loc) · 1.29 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
import com.ishland.c2me.gradle.RedirectingOutputStream
evaluationDependsOn(":tests")
evaluationDependsOn(":tests:test-mod")
sourceSets {
testmod {
compileClasspath += main.compileClasspath
runtimeClasspath += main.runtimeClasspath
}
}
loom {
runs {
testVanillaServer {
server()
runDir project.getProjectDir().toPath().relativize(project.getBuildDir().toPath()).resolve("testServer").toString()
source sourceSets.testmod
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"
}
}
}
}
}
afterEvaluate {
runTestVanillaServer.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
}
test {
useJUnitPlatform()
}