mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Processing Website examples
The Processing Website has more meta-data related to the examples. I'd like to use that meta-data going forward so I've added it
This commit is contained in:
Generated
+1
-1
@@ -3,7 +3,7 @@
|
||||
<ExternalSystemSettings>
|
||||
<option name="env">
|
||||
<map>
|
||||
<entry key="ORG_GRADLE_PROJECT_version" value="Local" />
|
||||
<entry key="ORG_GRADLE_PROJECT_version" value="Development Build" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="executionName" />
|
||||
|
||||
+21
-1
@@ -162,12 +162,32 @@ tasks.register<Copy>("unzipExamples") {
|
||||
val dl = tasks.findByPath("downloadProcessingExamples") as Download
|
||||
dependsOn(dl)
|
||||
from(zipTree(dl.dest)){ // remove top level directory
|
||||
exclude("processing-examples-main/README.md")
|
||||
exclude("processing-examples-main/.github/**")
|
||||
eachFile { relativePath = RelativePath(true, *relativePath.segments.drop(1).toTypedArray()) }
|
||||
includeEmptyDirs = false
|
||||
}
|
||||
into(layout.buildDirectory.dir("resources-bundled/common/modes/java/examples"))
|
||||
}
|
||||
tasks.register<Download>("downloadProcessingWebsiteExamples") {
|
||||
src("https://github.com/processing/processing-website/archive/refs/heads/main.zip")
|
||||
dest(layout.buildDirectory.file("tmp/processing-website.zip"))
|
||||
overwrite(false)
|
||||
}
|
||||
tasks.register<Copy>("unzipWebsiteExamples") {
|
||||
val dl = tasks.findByPath("downloadProcessingWebsiteExamples") as Download
|
||||
dependsOn(dl)
|
||||
dependsOn("unzipExamples")
|
||||
print(dl.dest)
|
||||
from(zipTree(dl.dest)){
|
||||
include("processing-website-main/content/examples/**")
|
||||
eachFile { relativePath = RelativePath(true, *relativePath.segments.drop(3).toTypedArray()) }
|
||||
includeEmptyDirs = false
|
||||
}
|
||||
into(layout.buildDirectory.dir("resources-bundled/common/modes/java/examples"))
|
||||
}
|
||||
tasks.register<Copy>("copyJavaMode"){
|
||||
dependsOn("unzipExamples")
|
||||
dependsOn("unzipExamples","unzipWebsiteExamples")
|
||||
dependsOn(project(":java").tasks.named("extraResources"))
|
||||
from(project(":java").layout.buildDirectory.dir("resources-bundled"))
|
||||
into(layout.buildDirectory.dir("resources-bundled"))
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user