Skip to content

Commit

Permalink
Add stonecutter and switch to kotlin gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterCheezeCake committed Oct 23, 2024
1 parent cfde323 commit a2a178f
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 91 deletions.
68 changes: 0 additions & 68 deletions build.gradle

This file was deleted.

61 changes: 61 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
plugins {
id("fabric-loom") version "1.7-SNAPSHOT"
id("maven-publish")
}

version = property("mod_version")!!
group = property("maven_group")!!

base {
archivesName.set(property("archives_base_name") as String)
}

repositories {
maven("https://maven.isxander.dev/releases")
maven("https://maven.terraformersmc.com/")
exclusiveContent {
forRepository {
maven {
url = uri("https://maven.azureaaron.net/releases")
}

}
filter {
includeGroup("net.azureaaron")
}
}
}

dependencies {
minecraft("com.mojang:minecraft:${property("minecraft_version")}")
mappings("net.fabricmc:yarn:${property("yarn_mappings")}:v2")
modImplementation ("net.fabricmc:fabric-loader:${property("loader_version")}")
modImplementation ("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")
modImplementation ("dev.isxander:yet-another-config-lib:${property("yacl_version")}")
modImplementation ("com.terraformersmc:modmenu:${property("modmenu_version")}")
include(modImplementation("net.azureaaron:hm-api:${property("hmapi_version")}") as Any)

}
tasks.processResources {
inputs.property("version", project.version)

filesMatching("fabric.mod.json") {
expand("version" to project.version)
}
}

tasks.withType<JavaCompile>().configureEach {
options.release.set(21)
}

java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks.named<Jar>("jar") {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}
17 changes: 4 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21
yarn_mappings=1.21+build.8
loader_version=0.15.11
org.gradle.java.home=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/
maven_group=wtf.cheeze.sbt
archives_base_name=SkyblockTweaks
loader_version=0.16.7

# Mod Properties
mod_version=0.1.0-Alpha.7
# mod_version = Unstable

maven_group=wtf.cheeze.sbt
archives_base_name=SkyblockTweaks

# Dependencies
fabric_version=0.100.6+1.21
modmenu_version=11.0.1
yacl_version=3.5.0+1.21-fabric
hmapi_version=1.0.0+1.21
10 changes: 0 additions & 10 deletions settings.gradle

This file was deleted.

25 changes: 25 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pluginManagement {
repositories {
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
mavenCentral()
gradlePluginPortal()
maven("https://maven.kikugie.dev/snapshots")
}
}

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

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

create(rootProject) {
versions("1.21.1", "1.21.2")
vcsVersion = "1.21.2"
}
}
9 changes: 9 additions & 0 deletions stonecutter.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
id("dev.kikugie.stonecutter")
}
stonecutter active "1.21.2" /* [SC] DO NOT EDIT */

stonecutter registerChiseled tasks.register("chiseledBuild", stonecutter.chiseled) {
group = "project"
ofTask("build")
}
6 changes: 6 additions & 0 deletions versions/1.21.1/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minecraft_version=1.21.1
fabric_version=0.106.0+1.21.1
modmenu_version=11.0.3
yacl_version=3.6.1+1.21-fabric
hmapi_version=1.0.1+1.21.1
yarn_mappings=1.21.1+build.3
6 changes: 6 additions & 0 deletions versions/1.21.2/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minecraft_version=1.21.2
fabric_version=0.106.1+1.21.2
modmenu_version=11.0.3
yacl_version=3.6.1+1.21-fabric
hmapi_version=1.0.1+1.21.1
yarn_mappings=1.21.2+build.1

0 comments on commit a2a178f

Please sign in to comment.