mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
Remove:
```
__LATEST_COMPOSE_RELEASE_VERSION__
__KOTLIN_COMPOSE_VERSION__
System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION")
```
They pollute templates/examples.
Now, all paths where we need to change the version are hardcoded in the script.
Usage:
```
./replace.sh 1.0.0-rc6
```
This script is planned to run on CI
In the future I will add support for changing Kotlin version
55 lines
1.3 KiB
Kotlin
55 lines
1.3 KiB
Kotlin
import org.jetbrains.compose.compose
|
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
plugins {
|
|
kotlin("jvm")
|
|
id("org.jetbrains.compose")
|
|
}
|
|
|
|
group = "me.user"
|
|
version = "1.0"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
|
}
|
|
|
|
dependencies {
|
|
implementation(compose.desktop.currentOs)
|
|
}
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
kotlinOptions.jvmTarget = "11"
|
|
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
|
|
}
|
|
|
|
compose.desktop {
|
|
application {
|
|
mainClass = "org.jetbrains.compose.demo.visuals.MainKt"
|
|
nativeDistributions {
|
|
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
|
packageName = "compose-demo"
|
|
packageVersion = "1.0.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
val additionalArguments = mutableListOf<String>()
|
|
|
|
val runTask = tasks.named<JavaExec>("run") {
|
|
this.args = additionalArguments
|
|
}
|
|
|
|
tasks.register("runWords") {
|
|
additionalArguments.add("words")
|
|
dependsOn(runTask)
|
|
}
|
|
|
|
tasks.register("runWave") {
|
|
additionalArguments.add("wave")
|
|
dependsOn(runTask)
|
|
}
|
|
} |