How to specify IntelliJ Exclude Directories using Gradle?

前端 未结 3 1390
轮回少年
轮回少年 2020-12-15 03:57

Using IntelliJ to open a build.gradle file, in the \"Import Project from Gradle\" window, the \"Excluded Roots\" are pre-populated with the .gradle

3条回答
  •  情书的邮戳
    2020-12-15 04:44

    Another solution. Works with Idea 13.

    idea.module {
         excludeDirs -= file(buildDir) //1
         buildDir.listFiles({d,f->f != 'generated-sources'} as FilenameFilter).each {excludeDirs += it}} //2
    
    1. Remove buildDir from excludeDirs.
    2. Exclude each buildDir child (except generating-source).

提交回复
热议问题