forked from PokeSkies/CobblemonPlaceholders
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
116 lines (93 loc) · 3.28 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
116 lines (93 loc) · 3.28 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
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
114
115
116
@file:Suppress("UnstableApiUsage")
plugins {
java
idea
id("quiet-fabric-loom") version "1.10-SNAPSHOT"
id("org.jetbrains.kotlin.jvm").version("2.2.0")
}
val modId = project.properties["mod_id"].toString()
version = project.properties["version"].toString()
group = project.properties["group"].toString()
base.archivesBaseName = project.properties["mod_name"].toString()
val minecraftVersion = project.properties["minecraft_version"].toString()
repositories {
mavenCentral()
maven {
name = "ParchmentMC"
url = uri("https://maven.parchmentmc.org")
}
maven {
name = "Modrinth"
url = uri("https://api.modrinth.com/maven")
content {
includeGroup("maven.modrinth")
}
}
maven("https://maven.nucleoid.xyz/") { name = "Nucleoid" }
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "sonatype-oss-snapshots1"
mavenContent { snapshotsOnly() }
}
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://maven.impactdev.net/repository/development/")
maven("https://maven.pokeskies.com/releases/")
}
loom {
splitEnvironmentSourceSets()
mods {
create(modId) {
sourceSet(sourceSets.main.get())
}
}
}
val modImplementationInclude by configurations.register("modImplementationInclude")
configurations {
modImplementationInclude
}
dependencies {
minecraft("com.mojang:minecraft:$minecraftVersion")
mappings(loom.layered {
officialMojangMappings()
// TODO: Fix hardcoded minecraft version once Parchment updates
parchment("org.parchmentmc.data:parchment-1.21:${project.properties["parchment_version"]}")
})
modImplementation("net.fabricmc:fabric-loader:${project.properties["loader_version"].toString()}")
modImplementation("net.fabricmc:fabric-language-kotlin:${project.properties["fabric_kotlin_version"].toString()}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.properties["fabric_version"].toString()}")
modImplementation("com.cobblemon:fabric:1.7.3+1.21.1")
// Adventure Text!
modImplementation(include("net.kyori:adventure-platform-fabric:5.14.2")!!)
modImplementation("me.lucko:fabric-permissions-api:0.3.1")?.let {
include(it)
}
modImplementation("io.github.miniplaceholders:miniplaceholders-api:2.2.3")
modImplementation("io.github.miniplaceholders:miniplaceholders-kotlin-ext:2.2.3")
modImplementation("eu.pb4:placeholder-api:2.4.1+1.21")
modImplementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
}
tasks.processResources {
inputs.property("version", version)
filesMatching("fabric.mod.json") {
expand("id" to modId, "version" to version)
}
filesMatching("**/lang/*.json") {
expand("id" to modId)
}
}
tasks.remapJar {
archiveFileName.set("${project.name}-fabric-$minecraftVersion-${project.version}.jar")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}
tasks.withType<AbstractArchiveTask> {
from("LICENSE") {
rename { "${it}_${modId}" }
}
}