-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
113 lines (93 loc) · 2.71 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.10"
kotlin("plugin.serialization") version "1.6.0"
id("fabric-loom") version "1.1-SNAPSHOT"
`idea`
}
loom {
accessWidenerPath.set(file("src/main/resources/makkit.accesswidener"))
}
object Versions {
const val Minecraft = "1.19.2"
object Jvm {
val Java = JavaVersion.VERSION_17
const val Kotlin = "1.8.10"
const val TargetKotlin = "17"
}
object Fabric {
const val Yarn = "1.19.2+build.28"
const val Loader = "0.14.17"
const val Api = "0.76.0+1.19.2"
}
object Mod {
const val Group = "io.ejekta"
const val ID = "makkit"
const val Version = "4.0.0-SNAPSHOT"
}
object Env {
const val Kambrik = "5.0.0-1.19.2-SNAPSHOT+"
const val FLK = "1.9.1+kotlin.1.8.10"
const val ClothConfig = "8.2.88"
const val ModMenu = "4.2.0-beta.2"
}
}
java {
sourceCompatibility = Versions.Jvm.Java
targetCompatibility = Versions.Jvm.Java
withSourcesJar()
withJavadocJar()
}
project.group = Versions.Mod.Group
version = Versions.Mod.Version
//compileKotlin.kotlinOptions.jvmTarget = "1.8"
repositories {
mavenLocal()
mavenCentral()
//maven(url = "https://kotlin.bintray.com/kotlinx")
maven(url = "https://maven.shedaniel.me/")
maven(url = "https://maven.terraformersmc.com/") {
name = "Mod Menu"
}
}
dependencies {
//to change the versions see the gradle.properties file
minecraft("com.mojang:minecraft:${Versions.Minecraft}")
mappings("net.fabricmc:yarn:${Versions.Fabric.Yarn}:v2")
modImplementation("net.fabricmc:fabric-loader:${Versions.Fabric.Loader}")
// Kambrik API
modImplementation("io.ejekta:kambrik:${Versions.Env.Kambrik}")
modApi("me.shedaniel.cloth:cloth-config-fabric:${Versions.Env.ClothConfig}") {
exclude(group = "net.fabricmc.fabric-api")
}
implementation("com.google.code.findbugs:jsr305:3.0.2")
modApi("com.terraformersmc:modmenu:${Versions.Env.ModMenu}") {
exclude(module = "fabric-api")
exclude(module = "config-2")
}
modImplementation(group = "net.fabricmc", name = "fabric-language-kotlin", version = Versions.Env.FLK)
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation("net.fabricmc.fabric-api:fabric-api:${Versions.Fabric.Api}")
}
tasks.getByName<ProcessResources>("processResources") {
filesMatching("fabric.mod.json") {
expand(
mutableMapOf<String, String>(
"modid" to Versions.Mod.ID,
"version" to Versions.Mod.Version,
"kotlinVersion" to Versions.Jvm.Kotlin,
"fabricApiVersion" to Versions.Fabric.Api
)
)
}
}
configurations.all {
resolutionStrategy {
force("net.fabricmc:fabric-loader:${Versions.Fabric.Loader}")
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = Versions.Jvm.TargetKotlin
}
}