-
Notifications
You must be signed in to change notification settings - Fork 80
/
build.gradle.kts
75 lines (61 loc) · 2.27 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
plugins {
id("fabric-loom").version("1.8-SNAPSHOT")
id("maven-publish")
}
val minecraft_version: String by project
val mappings_version: String by project
val fabric_loader_version: String by project
val fabric_api_version: String by project
val malilib_version: String by project
//val litematica_projectid: String by project
//val litematica_fileid: String by project
val litematica_version: String by project
val mod_menu_version: String by project
val archives_base_name: String by project
val mod_version: String by project
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenLocal()
mavenCentral()
maven("https://masa.dy.fi/maven")
//maven("https://www.cursemaven.com")
maven("https://maven.terraformersmc.com/releases/")
maven("https://jitpack.io")
}
dependencies {
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings("net.fabricmc:yarn:${mappings_version}:v2")
implementation("com.google.code.findbugs:jsr305:3.0.2")
modImplementation("net.fabricmc:fabric-loader:${fabric_loader_version}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabric_api_version}")
//modImplementation("fi.dy.masa.malilib:malilib-fabric-${malilib_version}")
//modImplementation("curse.maven:litematica-${litematica_projectid}:${litematica_fileid}")
// Sakura's Jitpack
modImplementation("com.github.sakura-ryoko:malilib:${malilib_version}")
modImplementation("com.github.sakura-ryoko:litematica:${litematica_version}")
// For Mod Menu display
modCompileOnly("com.terraformersmc:modmenu:${mod_menu_version}")
}
tasks.withType<ProcessResources> {
inputs.property("version", mod_version)
filesMatching("fabric.mod.json") {
expand(mapOf("version" to mod_version))
}
}
tasks.register("copyJar") {
// Specify that this task runs after the 'build' task
dependsOn("build")
// Specify the task's action
doLast {
val destination = file("build/${archives_base_name}-${minecraft_version}-${mod_version}.jar")
file("build/libs/litematica-printer.jar").copyTo(destination, true)
println("Copied output to ${destination.absolutePath}")
}
}
tasks.build {
finalizedBy("copyJar")
}