-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
88 lines (71 loc) · 2.38 KB
/
build.gradle.kts
File metadata and controls
88 lines (71 loc) · 2.38 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
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://server.bbkr.space/artifactory/libs-release")
maven("https://maven.terraformersmc.com/")
maven("https://maven.fabricmc.net/") { name = "Fabric" }
maven("https://maven.architectury.dev/") { name = "Architectury" }
maven("https://mvnrepository.com")
}
plugins {
id("java")
id("maven-publish")
id("gg.essential.defaults.java")
//id("gg.essential.defaults")
//id("gg.essential.defaults.loom")
id("gg.essential.multi-version")
}
val modVersion: String by project
base {
val name = project.property("archives_base_name") as String +
"-${project.property("mod_version")}" +
"+mc${project.property("minecraft_version")}"
archivesName.set(name)
}
loom {
mods {
create("spotify-controller") {
sourceSet(sourceSets["main"])
}
}
accessWidenerPath.set(file("../../src/main/resources/.accesswidener"))
}
sourceSets {
main {
resources.srcDir(file("../../src/main/resources"))
}
}
tasks.processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
dependencies {
modImplementation(fabricApi.module("fabric-lifecycle-events-v1", project.property("fabric_version") as String))
modImplementation(fabricApi.module("fabric-resource-loader-v0", project.property("fabric_version") as String))
modImplementation(fabricApi.module("fabric-key-binding-api-v1", project.property("fabric_version") as String))
modImplementation(fabricApi.module("fabric-command-api-v2", project.property("fabric_version") as String))
modImplementation(project.property("essential.defaults.loom.fabric-loader")!! as String)
modCompileOnly("com.terraformersmc:modmenu:3.0.0") // wise word from random person: don't touch it if it works
mappings(loom.officialMojangMappings())
minecraft(project.property("essential.defaults.loom.minecraft")!! as String)
}
tasks.processResources {
inputs.property("version", project.property("version") as String)
filesMatching("fabric.mod.json") {
expand("version" to project.property("version") as String)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.remapJar {
archiveClassifier.set(null as String?)
}
tasks.jar {
from("LICENSE_CODE") {
rename { "LICENSE_${project.base.archivesName.get()}_code"}
}
from("LICENSE_ASSETS") {
rename { "LICENSE_${project.base.archivesName.get()}_assets"}
}
}