-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.gradle
56 lines (48 loc) · 1.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
import com.ishland.c2me.gradle.RedirectingOutputStream
evaluationDependsOn(":tests")
evaluationDependsOn(":tests:test-mod")
loom {
runs {
testC2MEServer {
server()
runDir project.getProjectDir().toPath().relativize(project.getBuildDir().toPath()).resolve("testServer").toString()
vmArgs "-Dc2me.base.config.override.ioSystem.replaceImpl=true",
"-Dc2me.base.config.override.asyncScheduling.enabled=true",
"-Dc2me.base.config.override.ioSystem.gcFreeChunkSerializer=true",
"-Dcom.ishland.c2me.mixin.doAudit=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"
}
}
}
}
}
afterEvaluate {
runTestC2MEServer.configure {
doFirst {
standardOutput = new RedirectingOutputStream(project, getName())
}
onlyIf {
!getRootProject().getProjectDir().toPath().relativize(project.getBuildDir().toPath()).resolve("testServer").toFile().isDirectory()
}
}
migrateMappings.onlyIf { false }
}
dependencies {
runtimeOnly project(":tests:test-mod").sourceSets.main.output
runtimeOnly project(":").sourceSets.main.output
}
dependencies {
afterEvaluate {
(rootProject.subprojects - project(":tests")).forEach {
if (it.parent != project(":")) return
runtimeOnly project(path: ":${it.name}", configuration: "namedElements")
}
}
}
test {
useJUnitPlatform()
}