-
Notifications
You must be signed in to change notification settings - Fork 350
Expand file tree
/
Copy pathbuild.gradle
More file actions
86 lines (72 loc) · 2.54 KB
/
build.gradle
File metadata and controls
86 lines (72 loc) · 2.54 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
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
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm'
id 'eclipse'
id 'idea'
id 'maven-publish'
alias libs.plugins.modDevGradle
//alias libs.plugins.shadow
alias libs.plugins.spotless
alias libs.plugins.lombok
}
group = maven_group
// Formats the mod version to include the loader, Minecraft version, and '-SNAPSHOT-<timestamp>' if enabled.
boolean isSnapshot = System.getenv("SNAPSHOT")
version = "${mod_version}" + (isSnapshot ? "-SNAPSHOT" : "")
boolean isCI = System.getenv("CI") != null
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
sourceSets {
// Include resources generated by data generators.
main.resources {
srcDir 'src/generated/resources'
}
client {
compileClasspath += main.output
runtimeClasspath += main.output + main.runtimeClasspath
}
test {
compileClasspath += main.output + main.compileClasspath
runtimeClasspath += main.output + main.runtimeClasspath
}
extra {
compileClasspath += main.output
runtimeClasspath += main.output + main.runtimeClasspath
}
clientExtra {
compileClasspath += client.output + extra.compileClasspath
runtimeClasspath += client.output + client.runtimeClasspath + extra.runtimeClasspath
}
}
configurations {
// set these as unresolvable so we don't accidentally force all dependents to use them with us
clientRuntimeOnly.canBeResolved = false
extraRuntimeOnly.canBeResolved = false
clientExtraRuntimeOnly.canBeResolved = false
testImplementation.canBeResolved = false
testRuntimeOnly.canBeResolved = false
runtimeClasspath.extendsFrom localRuntime
extraRuntimeClasspath.extendsFrom extraLocalRuntime
clientRuntimeClasspath.extendsFrom clientLocalRuntime
extraClientRuntimeClasspath.extendsFrom clientExtraLocalRuntime
renderNurseCfg {
canBeConsumed = false
}
}
apply from: "$rootDir/gradle/scripts/jars.gradle"
apply from: "$rootDir/gradle/scripts/moddevgradle.gradle"
apply from: "$rootDir/gradle/scripts/repositories.gradle"
apply from: "$rootDir/dependencies.gradle"
apply from: "$rootDir/gradle/scripts/resources.gradle"
apply from: "$rootDir/gradle/scripts/publishing.gradle"
apply from: "$rootDir/gradle/scripts/spotless.gradle"
apply from: "$rootDir/gradle/scripts/docs.gradle"
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.compilerArgs << "-Xlint:-removal"
options.compilerArgs << "-Aquiet=true" // Suppress mixin notes
}
lombok {
version = "1.18.38"
}