Closed ejektaflex closed 2 years ago
Oh, thanks! I didn't see that.
Honestly, those gradle files are a bit overwhelming compared to the size of my project - the docs made it seem like it would be a bit more simple. I just want to target the JVM - and don't need such a complicated template layout. Is there any simple, single module (no submodule) build.gradle.kts for Kotlin/JVM only that I could poach?
I don't have any on hand but it should be as simple as creating a Kotlin JVM project in Intellij and just adding LittleKt -jvm
as a dependency.
Thanks, that worked perfectly! For posterity, I'll leave behind my build script:
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.10"
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
val littleKtVersion = "0.2.0" // get the latest release at the top
val kotlinCoroutinesVersion = "1.6.0" // or whatever version you are using
dependencies {
implementation(kotlin("stdlib"))
implementation("com.lehaine.littlekt:core:$littleKtVersion")
implementation("com.lehaine.littlekt:core-jvm:$littleKtVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion") // littlekt requires coroutines library on the classpath
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
}
}
A sample Github template repo would be nice, to make getting started with LittleKt a bit easier :^)
MiniGDX does this with their template, and (while I haven't used it) seemed very nice.
I tried to follow the installation instructions, but get the error: