@@ -9,7 +9,9 @@ import org.gradle.api.model.ObjectFactory
9
9
import org.gradle.api.plugins.JavaPlugin
10
10
import org.gradle.api.plugins.JavaPluginExtension
11
11
import org.jetbrains.compose.ComposeExtension
12
+ import org.jetbrains.compose.ComposePlugin
12
13
import org.jetbrains.compose.desktop.DesktopExtension
14
+ import org.jetbrains.kotlin.konan.properties.saveToFile
13
15
import java.io.File
14
16
import java.util.*
15
17
import javax.inject.Inject
@@ -23,8 +25,9 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
23
25
24
26
project.plugins.apply (" org.jetbrains.compose" )
25
27
project.plugins.apply (" org.jetbrains.kotlin.jvm" )
28
+ project.plugins.apply (" org.jetbrains.kotlin.plugin.compose" )
26
29
27
- project.dependencies.add(" implementation" , " org.processing:core:4.3.1 " )
30
+ project.dependencies.add(" implementation" , " org.processing:core:4.4.0 " )
28
31
project.dependencies.add(" implementation" , project.fileTree(" src" ).apply { include(" **/code/*.jar" ) })
29
32
30
33
// Base JOGL and Gluegen dependencies
@@ -53,6 +56,7 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
53
56
54
57
project.repositories.add(project.repositories.maven { it.setUrl(" https://jogamp.org/deployment/maven" ) })
55
58
project.repositories.add(project.repositories.mavenCentral())
59
+ project.repositories.add(project.repositories.mavenLocal())
56
60
57
61
project.extensions.configure(ComposeExtension ::class .java) { extension ->
58
62
extension.extensions.getByType(DesktopExtension ::class .java).application { application ->
@@ -72,15 +76,22 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
72
76
dependsOn(" run" )
73
77
}
74
78
project.tasks.create(" present" ).apply {
75
- // TODO: Implement dynamic fullscreen by setting the properties and recompiling the sketch every run
79
+ // TODO: Implement dynamic fullscreen by adding an argument to the task. This will require a change to core
76
80
group = " processing"
77
81
description = " Presents the Processing sketch"
78
82
dependsOn(" run" )
79
83
}
80
84
project.tasks.create(" export" ).apply {
81
85
group = " processing"
82
86
description = " Creates a distributable version of the Processing sketch"
87
+
83
88
dependsOn(" createDistributable" )
89
+ doLast{
90
+ project.copy {
91
+ it.from(project.tasks.named(" createDistributable" ).get().outputs.files)
92
+ it.into(project.layout.projectDirectory)
93
+ }
94
+ }
84
95
}
85
96
86
97
project.extensions.getByType(JavaPluginExtension ::class .java).sourceSets.all { sourceSet ->
@@ -127,6 +138,10 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
127
138
val preferences = File (settingsFolder, " preferences.txt" )
128
139
val prefs = Properties ()
129
140
prefs.load(preferences.inputStream())
141
+ prefs.setProperty(" export.application.fullscreen" , " false" )
142
+ prefs.setProperty(" export.application.present" , " false" )
143
+ prefs.setProperty(" export.application.stop" , " false" )
144
+ prefs.store(preferences.outputStream(), null )
130
145
131
146
val sketchbook = prefs.getProperty(" sketchbook.path.four" )
132
147
0 commit comments