Skip to content

Commit

Permalink
Slight overkill
Browse files Browse the repository at this point in the history
  • Loading branch information
kikugie committed Jul 27, 2024
1 parent 1a4a70b commit c5038c4
Show file tree
Hide file tree
Showing 23 changed files with 1,466 additions and 162 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ allprojects {
}

dependencies {
implementation(project(path = "kowoui", configuration = "namedElements"))
fun modules(vararg modules: String) {
modules.forEach { modApi(fabricApi.module("fabric-$it", libs.versions.fabric.api.get())) }
}
Expand Down
7 changes: 6 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ org.gradle.configureondemand=true

id=soundboard
name=Soundboard Core
group=dev.kikugie
version=0.3.0

kowoui.id=kowoui
kowoui.name=Kotlin OwO UI
kowoui.version=0.1.0-beta

group=dev.kikugie

mcdep=1.21
flk=>=0.11
owolib=~0.12
Expand Down
46 changes: 46 additions & 0 deletions kowoui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.fabric.loom)
}

class ModData {
val id: String = project.property("kowoui.id").toString()
val name: String = project.property("kowoui.name").toString()
val group: String = project.property("group").toString()
val version: String = project.property("kowoui.version").toString()
}
val mod = ModData()

version = "${mod.version}+${libs.versions.minecraft.get()}"
group = mod.group
base { archivesName.set(mod.id) }

dependencies {
minecraft(libs.minecraft)
mappings(variantOf(libs.yarn.mappings) { classifier("v2") })
modImplementation(libs.fabric.loader)
modImplementation(libs.fabric.kotlin)
modApi(libs.owo) {
exclude(group = "net.fabricmc")
}
}

tasks.processResources {
inputs.property("id", mod.id)
inputs.property("name", mod.name)
inputs.property("version", mod.version)
inputs.property("minecraft", project.property("mcdep").toString())
inputs.property("flk", project.property("flk").toString())
inputs.property("owolib", project.property("owolib").toString())

val map = mapOf(
"id" to mod.id,
"name" to mod.name,
"version" to mod.version,
"minecraft" to project.property("mcdep").toString(),
"flk" to project.property("flk").toString(),
"owolib" to project.property("owolib").toString(),
)

filesMatching("fabric.mod.json") { expand(map) }
}
Loading

0 comments on commit c5038c4

Please sign in to comment.