Fabric language module for Kotlin. Adds support for using a Kotlin object
as the main mod class and bundles the Kotlin libraries and runtime for you.
Add it as a dependency:
build.gradle.kts
repositories {
maven(url = "http://maven.fabricmc.net/") {
name = "Fabric"
}
maven(url = "https://kotlin.bintray.com/kotlinx") {
name = "Kotlin X"
}
// other repos
mavenCentral()
jcenter()
}
dependencies {
// TODO: loom 0.3.0 will allow using only modCompile
modCompile(group = "net.fabricmc", name = "fabric-language-kotlin", version = "1.3.21-SNAPSHOT")
compileOnly(group = "net.fabricmc", name = "fabric-language-kotlin", version = "1.3.21-SNAPSHOT")
}
build.gradle
repositories {
maven {
url = "http://maven.fabricmc.net/"
name = "Fabric"
}
maven {
url = "https://kotlin.bintray.com/kotlinx"
name = "Kotlin X"
}
}
dependencies {
// TODO: loom 0.3.0 will allow using only modCompile
modCompile(group: "net.fabricmc", name: "fabric-language-kotlin", version: "1.3.21-SNAPSHOT")
compileOnly(group: "net.fabricmc", name: "fabric-language-kotlin", version: "1.3.21-SNAPSHOT")
}
Set the language adapter for your mod to use by setting the languageAdapter
property in the fabric.mod.json
file:
and
Add a dependency entry to your fabric.mod.json
file:
{
"languageAdapter": "net.fabricmc.language.kotlin.KotlinLanguageAdapter",
"requires": {
"fabric-language-kotlin": {
"version": ">=1.3.21"
}
}
}
the version is ignored right now anyways but this is how it should work.. in theory
https://maven.fabricmc.net/net/fabricmc/fabric-language-kotlin/
update the readme in temaplates/README.template.md
run ./gradlew processMDTemplates