-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
114 lines (94 loc) · 3.29 KB
/
build.gradle.kts
File metadata and controls
114 lines (94 loc) · 3.29 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
plugins {
id("fabric-loom") version "0.12-SNAPSHOT"
// id("io.github.juuxel.loom-quiltflower") version "1.7.1"
id("maven-publish")
id("org.quiltmc.quilt-mappings-on-loom") version "4.0.0"
}
base {
archivesName.set(properties["archives_base_name"].toString())
}
version = properties["mod_version"].toString()
group = properties["maven_group"].toString()
repositories {
maven {
name = "ldtteam"
url = uri("https://ldtteam.jfrog.io/artifactory/parchmentmc-public/")
}
maven {
name = "Modrinth"
url = uri("https://api.modrinth.com/maven")
content {
includeGroup("maven.modrinth")
}
}
maven {
name = "shedaniel"
url = uri("https://maven.shedaniel.me/")
}
maven {
name = "Modrinth"
url = uri("https://api.modrinth.com/maven")
content {
includeGroup("maven.modrinth")
}
}
}
dependencies {
minecraft("com.mojang:minecraft:${properties["minecraft_version"].toString()}")
mappings(loom.layered {
this.addLayer(quiltMappings.mappings("org.quiltmc:quilt-mappings:${properties["minecraft_version"].toString()}+build.${properties["quilt_mappings"].toString()}:v2"))
officialMojangMappings()
})
modImplementation("net.fabricmc:fabric-loader:${properties["loader_version"].toString()}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${properties["fabric_version"].toString()}")
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${properties["cloth_config_version"]}") {
exclude("net.fabricmc.fabric-api")
}
modCompileOnlyApi("maven.modrinth:modmenu:${properties["modmenu_version"]}")
// modCompileOnly("maven.modrinth:sodium:${properties["sodium_version"].toString()}")
include(implementation("com.electronwill.night-config:core:${properties["night_config_version"].toString()}")!!)
include(implementation("com.electronwill.night-config:toml:${properties["night_config_version"].toString()}")!!)
modRuntimeOnly("maven.modrinth:lazydfu:0.1.3") {
exclude(module = "fabric-loader")
isTransitive = false
}
}
loom {
this.accessWidenerPath.set(file("src/main/resources/titleworlds.accesswidener"))
}
tasks {
processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand("version" to project.version)
}
}
withType<JavaCompile> {
options.release.set(17)
}
jar {
from("LICENSE") {
rename { "${it}_${project.properties["archivesBaseName"].toString()}" }
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
// configure the maven publication
publishing {
publications {
create<MavenPublication>("mod") {
from(components["java"])
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}