Skip to content

Commit

Permalink
I HATE KOTLIN (im using it anyways)
Browse files Browse the repository at this point in the history
  • Loading branch information
not-coded committed Oct 27, 2024
1 parent 8e6c475 commit dd7ff85
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 167 deletions.
129 changes: 0 additions & 129 deletions build.gradle

This file was deleted.

96 changes: 96 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
plugins {
id("fabric-loom") version "1.8-SNAPSHOT"
id("com.modrinth.minotaur") version "2.+"
}

val modName = property("mod.name").toString()
version = "${property("mod.version")}" + "+" + "${property("mod.version_name")}"
group = property("mod.maven_group").toString()


base {
archivesName.set(modName)
}

repositories {
maven("https://maven.shedaniel.me/")
maven("https://maven.terraformersmc.com/releases/")
}

dependencies {
minecraft("com.mojang:minecraft:${property("deps.minecraft")}")
mappings("net.fabricmc:yarn:${property("deps.yarn_mappings")}:v2")
modImplementation("net.fabricmc:fabric-loader:${property("deps.fabric_loader")}")

modImplementation("me.shedaniel.cloth:cloth-config-fabric:${property("deps.cloth_config_version")}")
modImplementation("com.terraformersmc:modmenu:${property("deps.mod_menu_version")}")

implementation("org.lwjgl:lwjgl-glfw:3.3.2")
}

loom {
decompilers {
get("vineflower").apply { // Adds names to lambdas - useful for mixins
options.put("mark-corresponding-synthetics", "1")
}
}

runConfigs.all {
ideConfigGenerated(true)
vmArgs("-Dmixin.debug.export=true")
runDir = "../../run"
}
}

val target = ">=${property("mod.min_target")}- <=${property("mod.max_target")}"

tasks.processResources {
val expandProps = mapOf(
"version" to project.version,
"minecraftVersion" to target,
"javaVersion" to project.property("deps.java")
)

filesMatching("fabric.mod.json") {
expand(expandProps)
}

inputs.properties(expandProps)
}

java {
withSourcesJar()

val javaVersion = if (project.property("deps.java") == "9") JavaVersion.VERSION_1_9 else JavaVersion.VERSION_17

sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}

tasks.register<Copy>("buildAndCollect") {
group = "build"
from(tasks.remapJar.get().archiveFile)
into(rootProject.layout.buildDirectory.file("libs"))
dependsOn("build")
}


modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set("wayfix")
versionNumber.set(version.toString())
versionName.set("v$version")
versionType.set("release")
uploadFile.set(tasks.remapJar)
gameVersions.addAll(property("publishing.supported_versions").toString().split(","))
loaders.addAll("fabric", "quilt")
//featured = true

dependencies {
required.project("cloth-config")
optional.project("modmenu")
}

val changes = rootProject.file("CHANGES.md").readText()
changelog = if (project.property("deps.java") == "9") "# Requires Java 9+\n\n$changes" else changes
}
22 changes: 0 additions & 22 deletions settings.gradle

This file was deleted.

26 changes: 26 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pluginManagement {
repositories {
maven("https://maven.fabricmc.net/")

gradlePluginPortal()
maven("https://maven.kikugie.dev/snapshots")
}
}

plugins {
id("dev.kikugie.stonecutter") version "0.5-beta.3"
}

stonecutter {
kotlinController = true
centralScript = "build.gradle.kts"

shared {
versions("1.16.5", "1.19", "1.19.3", "1.20.6")
vcsVersion = "1.19.3"
}

create(rootProject)
}

rootProject.name = "WayFix"
16 changes: 0 additions & 16 deletions stonecutter.gradle

This file was deleted.

14 changes: 14 additions & 0 deletions stonecutter.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id("dev.kikugie.stonecutter")
}
stonecutter active "1.20.6" /* [SC] DO NOT EDIT */

stonecutter registerChiseled tasks.register("chiseledBuild", stonecutter.chiseled) {
group = "project"
ofTask("buildAndCollect")
}

stonecutter registerChiseled tasks.register("chiseledModrinth", stonecutter.chiseled) {
group = "project"
ofTask("modrinth")
}

0 comments on commit dd7ff85

Please sign in to comment.