aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--build.gradle.kts25
1 files changed, 25 insertions, 0 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index d22f59a..10fb9f2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -299,4 +299,29 @@ if (properties["openrndr.tasks"] == "true") {
group = " \uD83E\uDD8C OPENRNDR"
dependsOn("jpackageZip")
}
+
+ task("add IDE file scopes") {
+ group = " \uD83E\uDD8C OPENRNDR"
+ val scopesFolder = File("${project.projectDir}/.idea/scopes")
+ scopesFolder.mkdirs()
+
+ val files = listOf(
+ "Code" to "file:*.kt||file:*.frag||file:*.vert||file:*.glsl",
+ "Text" to "file:*.txt||file:*.md||file:*.xml||file:*.json",
+ "Gradle" to "file[*buildSrc*]:*/||file:*gradle.*||file:*.gradle||file:*/gradle-wrapper.properties||file:*.toml",
+ "Images" to "file:*.png||file:*.jpg||file:*.dds||file:*.exr"
+ )
+ files.forEach { (name, pattern) ->
+ val file = File(scopesFolder, "__$name.xml")
+ if (!file.exists()) {
+ file.writeText(
+ """
+ <component name="DependencyValidationManager">
+ <scope name=" ★ $name" pattern="$pattern" />
+ </component>
+ """.trimIndent()
+ )
+ }
+ }
+ }
}