-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
115 lines (92 loc) · 3.81 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
114
115
@file:Suppress("UnstableApiUsage")
plugins {
id("org.jetbrains.kotlin.jvm").version("1.8.22")
id("quiet-fabric-loom") version "1.4-SNAPSHOT"
}
val modId = project.properties["mod_id"].toString()
version = project.properties["version"].toString()
group = project.properties["group"].toString()
base.archivesBaseName = project.properties["mod_name"].toString()
repositories {
mavenCentral()
maven( "https://jitpack.io")
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/")
}
loom {
splitEnvironmentSourceSets()
mods {
create(modId) {
sourceSet(sourceSets.main.get())
}
}
}
val modImplementationInclude by configurations.register("modImplementationInclude")
configurations {
modImplementationInclude
}
dependencies {
minecraft("com.mojang:minecraft:${project.properties["minecraft_version"].toString()}")
mappings("net.fabricmc:yarn:${project.properties["yarn_mappings"].toString()}:v2")
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(include("net.kyori:adventure-platform-fabric:5.9.0")!!)
modImplementation("me.lucko:fabric-permissions-api:0.2-SNAPSHOT")
modImplementation("eu.pb4:placeholder-api:2.2.0+1.20.2")
modImplementation("io.github.miniplaceholders:miniplaceholders-api:2.2.2")
modImplementation("io.github.miniplaceholders:miniplaceholders-kotlin-ext:2.2.2")
modImplementation("net.impactdev.impactor:common:5.1.1-SNAPSHOT")
modImplementation("net.impactdev.impactor.api:economy:5.1.1-SNAPSHOT")
modImplementation("net.impactdev.impactor.api:text:5.1.1-SNAPSHOT")
implementation(include("org.graalvm.sdk:graal-sdk:22.3.0")!!)
implementation(include("org.graalvm.truffle:truffle-api:22.3.0")!!)
modImplementation("com.github.plan-player-analytics:Plan:5.6.2614")
implementation(include("org.mongodb:mongodb-driver-sync:4.11.0")!!)
implementation(include("org.mongodb:mongodb-driver-core:4.11.0")!!)
implementation(include("org.mongodb:bson:4.11.0")!!)
implementation(include("org.mariadb.jdbc:mariadb-java-client:3.1.0")!!)
implementation(include("com.zaxxer:HikariCP:5.1.0")!!)
implementation(include("org.xerial:sqlite-jdbc:3.43.2.2")!!)
implementation(include("com.h2database:h2:2.2.224")!!)
implementation(include("com.mysql:mysql-connector-j:8.2.0")!!)
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-${project.properties["minecraft_version"]}-${project.version}.jar")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(17)
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
tasks.withType<AbstractArchiveTask> {
from("LICENSE") {
rename { "${it}_${modId}" }
}
}