-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
98 lines (82 loc) · 2.05 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
plugins {
id("fabric-loom") version "1.7-SNAPSHOT"
id("com.modrinth.minotaur") version "2.+"
`maven-publish`
}
version = "2.2.0+1.21"
group = "dev.ashhhleyyy"
repositories {
// needed for placeholder-api
maven {
name = "NucleoidMC"
url = uri("https://maven.nucleoid.xyz/")
}
// permissions api
maven {
name = "Sonatype OSS"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}
}
dependencies {
// Minecraft
minecraft(libs.minecraft)
mappings(variantOf(libs.yarn) { classifier("v2") })
// Fabric
modImplementation(libs.fabric.loader)
modImplementation(libs.fabric.api)
// placeholder-api
modImplementation(libs.placeholder.api)
include(libs.placeholder.api)
// fabric-api-permissions
modImplementation(libs.fabric.permissions)
include(libs.fabric.permissions)
}
loom {
runtimeOnlyLog4j.set(true)
}
tasks.processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand("version" to project.version)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
}
tasks.jar {
from("LICENSE") {
rename { "${it}_${project.name}" }
}
}
modrinth {
projectId.set("player-pronouns")
uploadFile.set(tasks.remapJar.get())
dependencies {
required.project("fabric-api")
}
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
repositories {
if (System.getenv("MAVEN_URL") != null) {
maven {
name = "ashhhleyyy"
setUrl(System.getenv("MAVEN_URL"))
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
} else {
mavenLocal()
}
}
}