### Gradle Build Script Setup for KotlinForForge Source: https://github.com/thedarkcolour/kotlinforforge/blob/6.x/README.md Integrate KotlinForForge into your existing project by adding the necessary plugins, repositories, and dependencies to your Gradle build script. This example shows setup for NeoForge. ```groovy plugins { id 'org.jetbrains.kotlin.jvm' version '2.2.20' // OPTIONAL Kotlin Serialization plugin //id 'org.jetbrains.kotlin.plugin.serialization' version '2.2.20' } repositories { // Add KFF Maven repository maven { name = 'Kotlin for Forge' url = 'https://thedarkcolour.github.io/KotlinForForge/' } } dependencies { // Adds KFF as dependency and Kotlin libs (use the variant matching your mod loader) // FORGE (1.21+ ONLY) NOT IMPLEMENTED YET //implementation 'thedarkcolour:kotlinforforge:6.0.0' // NEOFORGE implementation 'thedarkcolour:kotlinforforge-neoforge:6.0.0' } // ONLY ON REGULAR FORGE sourceSets.each { def dir = layout.buildDirectory.dir("sourcesSets/$it.name") it.output.resourcesDir = dir it.java.destinationDirectory = dir it.kotlin.destinationDirectory = dir } ``` -------------------------------- ### Gradle (Kotlin) Build Script Setup for KotlinForForge Source: https://github.com/thedarkcolour/kotlinforforge/blob/6.x/README.md Integrate KotlinForForge into your existing project using Kotlin DSL for your Gradle build script. This example shows setup for NeoForge. ```kotlin plugins { kotlin("jvm") version "2.2.20" // OPTIONAL Kotlin Serialization plugin //kotlin("plugin.serialization") version "2.2.20" } repositories { // Add KFF Maven repository maven { name = "Kotlin for Forge" setUrl("https://thedarkcolour.github.io/KotlinForForge/") } } dependencies { // Adds KFF as dependency and Kotlin libs (use the variant matching your mod loader) // FORGE (1.21+ ONLY) NOT IMPLEMENTED YET // implementation("thedarkcolour:kotlinforforge-neoforge:6.0.0") // NEOFORGE implementation("thedarkcolour:kotlinforforge-neoforge:6.0.0") } // ONLY ON REGULAR FORGE sourceSets.configureEach { val dir = layout.buildDirectory.dir("sourcesSets/$name") output.setResourcesDir(dir) java.destinationDirectory.set(dir) kotlin.destinationDirectory.set(dir) } ``` -------------------------------- ### Clone KotlinModdingSkeleton Repository Source: https://github.com/thedarkcolour/kotlinforforge/blob/6.x/README.md Use this command to clone the example mod repository. Replace BRANCH with your target version. ```git git clone --branch BRANCH https://github.com/thedarkcolour/KotlinModdingSkeleton.git ``` -------------------------------- ### NeoForge mods.toml Configuration Source: https://github.com/thedarkcolour/kotlinforforge/blob/6.x/README.md Configure your NeoForge mod loader and loader version in the mods.toml file to use KotlinForForge. ```toml modLoader="kotlinforforge" # Change this if you require a certain version of KotlinForForge loaderVersion="[6.0,)" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.