How do I get IntelliJ to resolve Gradle dependencies for custom source sets?

前端 未结 1 393
遥遥无期
遥遥无期 2021-01-04 06:20

When IntelliJ opens a build.gradle file it will generate an IntelliJ project with the Gradle dependencies resolved and added to the project scope. This works gr

相关标签:
1条回答
  • 2021-01-04 07:09

    This is described in Gradle user guide - http://www.gradle.org/docs/current/userguide/idea_plugin.html and http://www.gradle.org/docs/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html

    You will need to add something like:

    idea {
      module {
        scopes.TEST.plus += [ configurations.componentTestCompile ]
      }
    }
    

    to your build.gradle file.

    0 讨论(0)
提交回复
热议问题