Better Kotlin-Ant compatibility

This commit is contained in:
Stef Tervelde
2025-01-26 18:45:28 +01:00
parent 205fc07d19
commit ccda7fbf3f
4 changed files with 22 additions and 15 deletions
+3
View File
@@ -68,7 +68,10 @@ compose.desktop {
upgradeUuid = "89d8d7fe-5602-4b12-ba10-0fe78efbd602"
}
linux {
appCategory = "Programming"
menuGroup = "Processing"
iconFile = project.file("../build/linux/processing.png")
// Fix fonts on some Linux distributions
jvmArgs("-Dawt.useSystemAAFontSettings=on")
}
+1
View File
@@ -169,6 +169,7 @@
nowarn="true">
<compilerarg value="-Xlint:deprecation" />
<src path="src" />
<src path="ant" />
</javac>
</target>
+18 -15
View File
@@ -5,21 +5,24 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
fun ExamplesLibrary(){
class ExamplesLibrary{
companion object{
@JvmStatic
fun main(args: Array<String>) = application {
val active = remember { mutableStateOf(true) }
if(!active.value){
Window(onCloseRequest = ::exitApplication) {
}
return@application
}
Window(
onCloseRequest = { active.value = false },
) {
ExamplesLibrary()
}
}
}
}
fun main() = application {
val active = remember { mutableStateOf(true) }
if(!active.value){
Window(onCloseRequest = ::exitApplication) {
}
return@application
}
Window(
onCloseRequest = { active.value = false },
) {
ExamplesLibrary()
}
}