-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
50 lines (42 loc) · 1.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
plugins {
val kotlinVersion: String by System.getProperties()
java
kotlin("jvm") version kotlinVersion
id("fabric-loom") version "1.0.+"
}
group = "com.example"
version = "1.0"
repositories {
mavenCentral()
}
dependencies {
val kotlinVersion: String by System.getProperties()
val minecraftVersion: String by project
val yarnVersion: String by project
val loaderVersion: String by project
val fabricVersion: String by project
val fabricKotlinVersion: String by project
implementation(kotlin("stdlib-jdk8", kotlinVersion))
minecraft("com.mojang:minecraft:$minecraftVersion")
mappings("net.fabricmc:yarn:$yarnVersion:v2")
modImplementation("net.fabricmc:fabric-loader:$loaderVersion")
modImplementation("net.fabricmc.fabric-api:fabric-api:$fabricVersion")
modImplementation("net.fabricmc:fabric-language-kotlin:$fabricKotlinVersion+kotlin.$kotlinVersion")
}
kotlin {
jvmToolchain {
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks {
processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand(
mutableMapOf(
"version" to project.version
)
)
}
}
}