File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
java/gradle/src/main/kotlin Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,11 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
2626 val workingDir = project.findProperty(" processing.workingDir" ) as String?
2727 val debugPort = project.findProperty(" processing.debugPort" ) as String?
2828
29+ val osName = System .getProperty(" os.name" ).lowercase()
30+
2931 // Grab the settings from the most likely location if not defined
3032 var settingsFolder = (project.findProperty(" processing.settings" ) as String? )?.let { File (it) }
3133 if (settingsFolder == null ) {
32- val osName = System .getProperty(" os.name" ).lowercase()
3334 if (osName.contains(" win" )) {
3435 settingsFolder = File (System .getenv(" APPDATA" ), " Processing" )
3536 } else if (osName.contains(" mac" )) {
@@ -53,6 +54,11 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
5354 ? : prefs.getProperty(" sketchbook.path.four" )
5455 ? : (" ${System .getProperty(" user.home" )} /.processing" )
5556
57+ // Replace slashes with backslashes on Windows
58+ if (osName.contains(" win" )) {
59+ sketchbook.replace(" /" , " \\ " )
60+ }
61+
5662 // Apply the Java plugin to the Project
5763 project.plugins.apply (JavaPlugin ::class .java)
5864
You can’t perform that action at this time.
0 commit comments