49 lines
1.2 KiB
Text
49 lines
1.2 KiB
Text
|
import org.jetbrains.compose.compose
|
||
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||
|
|
||
|
plugins {
|
||
|
kotlin("jvm") version "1.5.21"
|
||
|
id("org.jetbrains.compose") version "1.0.0-alpha1"
|
||
|
}
|
||
|
|
||
|
group = "de.pheerai"
|
||
|
version = "0.0.1-SNAPSHOT"
|
||
|
|
||
|
repositories {
|
||
|
jcenter()
|
||
|
mavenCentral()
|
||
|
google()
|
||
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
implementation(compose.desktop.currentOs)
|
||
|
testImplementation(kotlin("test"))
|
||
|
}
|
||
|
|
||
|
tasks.test {
|
||
|
useJUnitPlatform()
|
||
|
}
|
||
|
|
||
|
tasks.withType<KotlinCompile>() {
|
||
|
kotlinOptions.jvmTarget = "11"
|
||
|
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
|
||
|
}
|
||
|
|
||
|
compose.desktop {
|
||
|
application {
|
||
|
mainClass = "MainKt"
|
||
|
nativeDistributions {
|
||
|
targetFormats(TargetFormat.Deb, TargetFormat.Rpm)
|
||
|
packageName = "jeopardy"
|
||
|
val fullVersion = (project.version as String)
|
||
|
packageVersion = if (fullVersion.contains("-SNAPSHOT")) {
|
||
|
fullVersion.removeSuffix("-SNAPSHOT")
|
||
|
} else {
|
||
|
fullVersion
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|