-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
44 lines (37 loc) · 1.16 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
val javaVersion = JvmTarget.JVM_21
val silkVersion = "1.10.7"
plugins {
kotlin("jvm") version "2.0.0"
id("fabric-loom") version "1.7-SNAPSHOT"
}
group = "org.example"
version = "1.0.0"
repositories {
mavenCentral()
}
dependencies {
minecraft("com.mojang:minecraft:1.21")
mappings("net.fabricmc:yarn:1.21+build.9")
modImplementation("net.fabricmc:fabric-loader:0.16.0")
modImplementation("net.fabricmc.fabric-api:fabric-api:0.100.7+1.21")
modImplementation("net.fabricmc:fabric-language-kotlin:1.10.19+kotlin.1.9.23")
modImplementation("net.silkmc:silk-core:$silkVersion")
}
tasks {
compileKotlin {
compilerOptions {
freeCompilerArgs = listOf("-Xjdk-release=${javaVersion.target}", "-Xskip-prerelease-check")
jvmTarget.set(javaVersion)
}
}
compileJava {
options.encoding = "UTF-8"
options.release.set(javaVersion.target.toInt())
}
processResources {
val properties = mapOf("version" to project.version)
inputs.properties(properties)
filesMatching("fabric.mod.json") { expand(properties) }
}
}