aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbe Pazos <abe@hamoid.com>2023-04-24 20:33:33 +0200
committerEdwin Jakobs <edwin@rndr.studio>2023-04-27 15:55:01 +0200
commit2534cd25ff1733ca9d34a5229396e055b408ea98 (patch)
treee7f12f922ff154d947a102d14b70cdc89792f764
parent38c37d2df059ee3175994729c202793edf9c4b3a (diff)
downloadart-playground-openrndr-2534cd25ff1733ca9d34a5229396e055b408ea98.tar.gz
art-playground-openrndr-2534cd25ff1733ca9d34a5229396e055b408ea98.zip
Add Gradle task to add scopes to IntelliJ
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()
+ )
+ }
+ }
+ }
}