Skip to content

Commit 96ce611

Browse files
committed
Add Processing build in libraries
1 parent 374ba2c commit 96ce611

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/src/processing/app/gradle/GradleJob.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class GradleJob(
102102
"version" to getVersionName(),
103103
"sketchFolder" to sketchFolder,
104104
"sketchbook" to getSketchbookFolder(),
105+
"root" to getContentFile("").absolutePath.replace("""\""", """\\"""),
105106
"workingDir" to workingDir.toAbsolutePath().toString(),
106107
"settings" to getSettingsFolder().absolutePath.toString(),
107108
"unsaved" to unsaved.joinToString(","),

java/gradle/src/main/kotlin/ProcessingPlugin.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
3030
// TODO: Setup sketchbook when using as a standalone plugin, use the Java Preferences
3131
val sketchbook = project.findProperty("processing.sketchbook") as String?
3232
val settings = project.findProperty("processing.settings") as String?
33+
val root = project.findProperty("processing.root") as String?
3334

3435
// Apply the Java plugin to the Project, equivalent of
3536
// plugins {
@@ -180,7 +181,7 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
180181
val librariesTaskName = sourceSet.getTaskName("scanLibraries", "PDE")
181182
val librariesScan = project.tasks.register(librariesTaskName, LibrariesTask::class.java) { task ->
182183
task.description = "Scans the libraries in the sketchbook"
183-
task.libraryDirectories.from(sketchbook?.let { File(it, "libraries") })
184+
task.libraryDirectories.from(sketchbook?.let { File(it, "libraries") }, root?.let { File(it).resolve("modes/java/libraries") })
184185
}
185186

186187
// Create a task to process the .pde files before compiling the java sources

0 commit comments

Comments
 (0)