Browse Source

Add Gradle task to add scopes to IntelliJ

master
Abe Pazos 2 years ago
committed by Edwin Jakobs
parent
commit
2534cd25ff
  1. 25
      build.gradle.kts

25
build.gradle.kts

@ -299,4 +299,29 @@ if (properties["openrndr.tasks"] == "true") {
group = " \uD83E\uDD8C OPENRNDR" group = " \uD83E\uDD8C OPENRNDR"
dependsOn("jpackageZip") 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()
)
}
}
}
} }

Loading…
Cancel
Save