Exclude directory from indexing within gradle projects

Answered

For example, when I import a project, the release dir is not excluded, I need to do it manually every time, is there a way to instruct gradle to not make the IDE import it as a "normal" dir ?

4 comments
Comment actions Permalink

You need to set exclude at build.gradle, IDEA will always overwrite project settings at File | Project structure with settings taken from build.gradle.

0
Comment actions Permalink

> You need to set exclude at build.gradle

@... How to do that?

0
Comment actions Permalink

You can exclude a directory in IntelliJ with this Gradle (Kotlin) config:

plugins {
id("org.jetbrains.gradle.plugin.idea-ext") version "1.0"
}

idea {
  module {
    excludeDirs = setOf(file("out"))
  }
}
0

Please sign in to leave a comment.