Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 24 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,30 @@ group = "com.myDomain"
// You can update these numbers as you release new versions of your library.
version = "1.0.0"

// The location of your sketchbook folder. The sketchbook folder holds your installed
// libraries, tools, and modes. It is needed if you:
// 1. wish to copy the library to the Processing sketchbook, which installs the library locally
// 2. have Processing library dependencies
// Depending on your OS, the code below should set the correct location, if you are using a Mac,
// Windows, or Linux machine.
// If you run the Gradle task deployToProcessingSketchbook, and you do not see your library
// in the contributions manager, then one possible cause could be the sketchbook location
// is wrong. 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"
}
// If you need to set the sketchbook location manually, uncomment out the following
// line and set sketchbookLocation to the correct location
// sketchbookLocation = "$userHome/sketchbook"


// Repositories where dependencies will be fetched from.
// You can add additional repositories here if your dependencies are hosted elsewhere.
repositories {
Expand Down Expand Up @@ -107,20 +131,6 @@ val releaseRoot = "$rootDir/release"
val releaseName = libName
val releaseDirectory = "$releaseRoot/$releaseName"

// 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"
}

// read in user-defined properties in release.properties file
// to be saved in library.properties file, a required file in the release
// using task writeLibraryProperties
Expand Down