Repository navigation
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
81 lines (65 loc) · 1.96 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
81 lines (65 loc) · 1.96 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
// "maven-publish"
kotlin("jvm") version "2.3.0"
id("net.fabricmc.fabric-loom-remap") version "1.14-SNAPSHOT"
}
val version = "0.0.1"
val group = "one.oktw"
val minecraftVersion = "1.21.11"
val fabricLoaderVersion = "0.18.3"
val fabricAPIVersion = "0.140.0+1.21.11"
val galaxyLibVersion = "2235da5"
repositories {
mavenCentral()
maven(url = "https://jitpack.io")
}
base {
archivesName.set("Galaxy")
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
apiVersion = KotlinVersion.KOTLIN_2_0
languageVersion = KotlinVersion.KOTLIN_2_0
jvmTarget = JvmTarget.JVM_21
}
}
loom {
accessWidenerPath.set(file("src/main/resources/galaxy.accesswidener"))
}
fabricApi {
configureDataGeneration {
createSourceSet = true
modId = "galaxy"
}
}
dependencies {
// Core
minecraft("com.mojang:minecraft:${minecraftVersion}")
mappings(loom.officialMojangMappings())
modImplementation("net.fabricmc:fabric-loader:${fabricLoaderVersion}")
// fabric api
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabricAPIVersion}") {
val gametest = fabricApi.module("fabric-gametest-api-v1", fabricAPIVersion) // Unused and cause client Registry remapping failed.
exclude(gametest.group, gametest.name)
}
// galaxy api
implementation("one.oktw:galaxy-lib:${galaxyLibVersion}")
// Jar in Jar
include("one.oktw:galaxy-lib:${galaxyLibVersion}:all")
}
tasks.getByName<ProcessResources>("processResources") {
inputs.property("version", version)
filesMatching("fabric.mod.json") {
expand(Pair("version", version))
}
}
tasks.getByName<Jar>("jar") {
from("LICENSE")
}