File tree Expand file tree Collapse file tree
java/gradle/src/main/kotlin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ dependencies {
140140}
141141
142142tasks.test {
143+ systemProperty(" java.awt.headless" , " true" )
143144 useJUnitPlatform()
144145 workingDir = file(" build/test" )
145146 workingDir.mkdirs()
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import processing.app.*
3939import processing.app.api.Contributions.ExamplesList.Companion.listAllExamples
4040import processing.app.api.Sketch.Companion.Sketch
4141import processing.app.ui.theme.*
42+ import java.awt.GraphicsEnvironment
4243import java.io.File
4344import kotlin.io.path.Path
4445import kotlin.io.path.exists
@@ -554,10 +555,14 @@ fun Sketch.card(onOpen: () -> Unit = {}) {
554555}
555556
556557fun noBaseWarning () {
557- Messages .showWarning(
558- " No Base" ,
559- " No Base instance provided, this ui is likely being previewed."
560- )
558+ if (Base .isCommandLine() || GraphicsEnvironment .isHeadless()) {
559+ System .err.println (" No Base instance provided, this ui is likely being previewed" );
560+ } else {
561+ Messages .showWarning(
562+ " No Base" ,
563+ " No Base instance provided, this ui is likely being previewed."
564+ )
565+ }
561566}
562567
563568val size = DpSize (970 .dp, 600 .dp)
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
2323 val processingVersion = project.findProperty(" processing.version" ) as String?
2424 ? : javaClass.classLoader.getResourceAsStream(" version.properties" )?.use { stream ->
2525 java.util.Properties ().apply { load(stream) }.getProperty(" version" )
26- } ? : " 4.3.4 "
26+ }?. takeIf { it != " unspecified " } ? : " 4.5.5 "
2727 val processingGroup = project.findProperty(" processing.group" ) as String? ? : " org.processing"
2828 val workingDir = project.findProperty(" processing.workingDir" ) as String?
2929 val debugPort = project.findProperty(" processing.debugPort" ) as String?
You can’t perform that action at this time.
0 commit comments