Skip to content

Commit ccda7fb

Browse files
committed
Better Kotlin-Ant compatibility
1 parent 205fc07 commit ccda7fb

4 files changed

Lines changed: 22 additions & 15 deletions

File tree

app/src/processing/app/contrib/ui/ContributionManagerKt.java renamed to app/ant/processing/app/contrib/ui/ContributionManagerKt.java

File renamed without changes.

app/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ compose.desktop {
6868
upgradeUuid = "89d8d7fe-5602-4b12-ba10-0fe78efbd602"
6969
}
7070
linux {
71+
appCategory = "Programming"
72+
menuGroup = "Processing"
7173
iconFile = project.file("../build/linux/processing.png")
74+
// Fix fonts on some Linux distributions
7275
jvmArgs("-Dawt.useSystemAAFontSettings=on")
7376
}
7477

app/build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
nowarn="true">
170170
<compilerarg value="-Xlint:deprecation" />
171171
<src path="src" />
172+
<src path="ant" />
172173
</javac>
173174
</target>
174175

app/src/processing/app/ui/ExamplesLibrary.kt

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,24 @@ import androidx.compose.runtime.remember
55
import androidx.compose.ui.window.Window
66
import androidx.compose.ui.window.application
77

8-
fun ExamplesLibrary(){
9-
10-
}
11-
12-
fun main() = application {
13-
val active = remember { mutableStateOf(true) }
14-
if(!active.value){
15-
Window(onCloseRequest = ::exitApplication) {
8+
class ExamplesLibrary{
9+
companion object{
10+
@JvmStatic
11+
fun main(args: Array<String>) = application {
12+
val active = remember { mutableStateOf(true) }
13+
if(!active.value){
14+
Window(onCloseRequest = ::exitApplication) {
1615

16+
}
17+
return@application
18+
}
19+
Window(
20+
onCloseRequest = { active.value = false },
21+
) {
22+
ExamplesLibrary()
23+
}
1724
}
18-
return@application
19-
}
20-
Window(
21-
onCloseRequest = { active.value = false },
22-
) {
23-
ExamplesLibrary()
2425
}
25-
}
26+
27+
}
28+

0 commit comments

Comments
 (0)