Fabric language module for Scala. Adds support for using a Scala object
as the main mod
class and bundles the Scala libraries for you.
Add it as a dependency:
dependencies {
implementation(group: 'org.scala-lang', name: 'scala-library', version: "2.13.15")
// (Optional) If you need scala3
implementation(group: 'org.scala-lang', name: 'scala3-library_3', version: "3.5.0")
// (Optional) If you need cats. You also need to add repositories as below.
implementation(group: "org.typelevel", name: "cats-core_3_", version: project.catsVersion)
implementation(group: "org.typelevel", name: "cats-kernel_3", version: project.catsVersion)
// If you write entrypoint in Scala. If entrypoint is Java, you can use default(fabric) entrypoint loader.
modImplementation("com.kotori316:scalable-cats-force-fabric:3.1.3:dev")
}
// If you need cats.
repositories {
maven {
name = "Kotori316"
// See https://maven.kotori316.com for versions
url = uri("https://maven.kotori316.com")
content {
includeGroup("com.kotori316")
// (Optional)
includeVersion("org.typelevel", "cats-core_3", project.catsVersion)
includeVersion("org.typelevel", "cats-kernel_3", project.catsVersion)
}
}
}
(If you want to write entrypoint in scala)
Specify your entrypoint in your fabric.mod.json
like so:
{
"entrypoints": {
"main": [
{
"adapter": "kotori_scala",
"value": "package.ClassName"
}
]
}
}
Add a dependency entry to your fabric.mod.json
file:
{
"requires": {
"kotori_scala": ">=1.0.0"
}
}