Skip to content

Clarify the Comment on Code for Determining the Sketchbook Folder Location in build.gradle.kts #40

@SableRaf

Description

@SableRaf

While reading through the build.gradle.kts file, I noticed that the comment explaining the code for determining the sketchbook folder location doesn’t fully clarify its purpose or how users should interact with it. Looking at this from the perspective of a library creator, I feel a bit uncertain about what role this step plays in the build and what actions, if any, I might need to take.

Here’s the code in question:

// The location of your sketchbook folder. The sketchbook folder holds your installed libraries, tools, and modes
// Depending on your OS, it should set the correct location.
// You can check the sketchbook location in your Processing application preferences.
var sketchbookLocation = ""
val userHome = System.getProperty("user.home")
val currentOS = OperatingSystem.current()
if(currentOS.isMacOsX) {
    sketchbookLocation = "$userHome/Documents/Processing/sketchbook"
} else if(currentOS.isWindows) {
    sketchbookLocation = "$userHome/My Documents/Processing/sketchbook"
} else {
    sketchbookLocation = "$userHome/sketchbook"
}

Here are a few questions that come to mind:

  1. Could the comment provide more context on why determining the sketchbook location is important?
  2. What are potential edge cases or scenarios where this might not work as expected? In such a case, how will a user know if the sketchbook location could not be determined? How should they fix it?
  3. Is this code part of the internal configuration, or might there be situations where a user would need to adjust the sketchbook location manually? In that case should this be moved to the USER BUILD CONFIGURATIONS section?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions