-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
78 lines (61 loc) · 2.04 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
import org.jetbrains.kotlin.gradle.utils.extendsFrom
plugins {
id("java")
`kotlin-dsl`
id("io.papermc.paperweight.userdev") version "1.7.1"
}
version = project.properties["mod_version"].toString()
var mcVer = properties["mc_version"]?.toString()
if (mcVer == null){
throw IllegalArgumentException("Missing mc_version field")
}
repositories {
mavenCentral()
mavenLocal()
maven("https://repo.spongepowered.org/maven/")
}
dependencies {
implementation("org.jetbrains:annotations:24.1.0")
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.5.11")
implementation("com.github.johnrengelman:shadow:8.1.1")
remapper("net.fabricmc:tiny-remapper:0.10.1:fat")
val include = configurations.create("include")
// We can use "include" configuration to add dependencies that will be included to jar
include("net.fabricmc:tiny-remapper:0.10.1:fat") {isTransitive = false}
configurations.implementation.extendsFrom(configurations.named("include"))
implementation("space.vectrix.ignite:ignite-api:1.0.1")
implementation("org.spongepowered:mixin:0.8.5")
implementation("io.github.llamalad7:mixinextras-common:0.3.5")
paperweight.paperDevBundle(mcVer)
}
tasks.processResources {
filteringCharset = "UTF-8"
filesMatching("ignite.mod.json") {
expand(project.properties)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.jar {
val dependencies = configurations.named("include").get().map {
if (it.isDirectory()){
return@map it
} else {
return@map zipTree(it)
}
}
from(dependencies)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
// Remove if below Paper 1.20.5
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
// Remapping, required below Paper 1.20.5
//tasks.reobfJar {
// remapperArgs.add("--mixin")
//}
//
//tasks.build {
// dependsOn("reobfJar")
//}