FabricMC/fabric-language-kotlin
About
Fabric language module for Kotlin.
Developer ToolsMeasured star growth
- in 24h
- +1
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalfabric-language-kotlin
Fabric language module for Kotlin. Adds support for Kotlin exclusive entrypoints and bundles the Kotlin Stdlib as well as common kotlinx libraries.
Usage
Dependency
Add it as a dependency to your Gradle project:
dependencies {
implementation("net.fabricmc:fabric-language-kotlin:1.14.4+kotlin.2.5.0")
// Or, for legacy versions of Loom:
// modImplementation("net.fabricmc:fabric-language-kotlin:1.14.4+kotlin.2.5.0")
}
Adapter
Use the kotlin adapter for your mod by setting the adapter property in the fabric.mod.json file.
Remember to the add a dependency entry to your fabric.mod.json file:
{
"schemaVersion": 1,
"entrypoints": {
"main": [
{
"adapter": "kotlin",
"value": "package.ClassName"
}
]
},
"depends": {
"fabric-language-kotlin": ">=1.14.4+kotlin.2.5.0"
}
}
For more info reference the fabric.mod.json documentation.
Do not forget to set the schemaVersion to 1 or it will fall back to schema 0 and will not attempt to load entrypoints.
Entrypoint samples
| Kind | Class reference | Function reference | Field reference |
|---|---|---|---|
class |
|
||
object |
|
|
|
companion object |
|
|
|
top level |
File:
|
Companion objects can be used by appending $Companion to the class.
Take care of processResources there, it might try to expand it, in that case escape it.
Bundled libraries
org.jetbrains.kotlin namespace:
org.jetbrains.kotlinx namespace:
kotlinx-coroutines-core1.11.0 Guide, API docs, GitHubkotlinx-coroutines-jdk81.11.0 API docskotlinx-serialization-core1.13.0 Guide, API docs, GitHubkotlinx-serialization-json1.13.0 API docskotlinx-serialization-cbor1.13.0 API docsatomicfu0.33.0 GitHubkotlinx-datetime0.8.0 GitHubkotlinx-io-core0.9.3 API docs, GitHubkotlinx-io-bytestring0.9.3 API docs
Available Versions
https://maven.fabricmc.net/net/fabricmc/fabric-language-kotlin/
Updating README
- Update the readme in
templates/README.template.md. - Run
./gradlew processMDTemplates.
Explore related projects
Loading…