-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
86 lines (74 loc) · 2.29 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
allprojects {
group = "dev.fastmc"
version = "0.0.2"
}
runVmOptions {
add(
"-Xms2G",
"-Xmx2G",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+AlwaysPreTouch",
"-XX:+ExplicitGCInvokesConcurrent",
"-XX:+ParallelRefProcEnabled",
"-XX:+UseG1GC",
"-XX:+UseStringDeduplication",
"-XX:MaxGCPauseMillis=1",
"-XX:G1NewSizePercent=2",
"-XX:G1MaxNewSizePercent=10",
"-XX:G1ReservePercent=15",
"-XX:G1HeapWastePercent=10",
"-XX:G1MixedGCCountTarget=16",
"-XX:InitiatingHeapOccupancyPercent=50",
"-XX:G1MixedGCLiveThresholdPercent=50",
"-XX:G1RSetUpdatingPauseTimePercent=25",
"-XX:G1OldCSetRegionThresholdPercent=5",
"-XX:SurvivorRatio=5",
"-XX:FlightRecorderOptions=stackdepth=512"
)
}
plugins {
id("dev.fastmc.mod-setup").version("1.2-SNAPSHOT")
}
subprojects {
repositories {
mavenCentral()
maven("https://maven.fastmc.dev/")
maven("https://libraries.minecraft.net/")
}
dependencies {
val kotlinVersion: String by rootProject
val kotlinxCoroutineVersion: String by rootProject
val jomlVersion: String by rootProject
"libraryImplementation"("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
"libraryImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutineVersion")
"libraryImplementation"("org.joml:joml:$jomlVersion")
compileOnly("org.apache.logging.log4j:log4j-api:2.8.1")
compileOnly("it.unimi.dsi:fastutil:7.1.0")
}
tasks {
withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs += listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.contracts.ExperimentalContracts",
"-Xbackend-threads=0"
)
}
}
}
}
tasks {
val collectJars by register<Copy>("collectJars") {
group = "build"
from(
provider {
subprojects.mapNotNull { it.tasks.findByName("modLoaderJar")?.outputs }
}
)
into(file("$buildDir/libs"))
}
assemble {
finalizedBy(collectJars)
}
}