Skip to content

Commit

Permalink
Make IDEA support work out of the box
Browse files Browse the repository at this point in the history
Instead of requiring users to apply the `idea` plugin, which is normally
not necessary when using IDEA's importer.

Fixes google#474
  • Loading branch information
oehme committed Jun 17, 2021
1 parent 46825f9 commit f3c9aba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/groovy/com/google/protobuf/gradle/Utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ class Utils {
* not exist, it will be created before the IDE task is run.
*/
static void addToIdeSources(Project project, boolean isTest, File f, boolean isGenerated) {
IdeaModel model = project.getExtensions().findByType(IdeaModel)
if (model != null) {
project.plugins.withId("idea") {
IdeaModel model = project.getExtensions().findByType(IdeaModel)
if (isTest) {
model.module.testSourceDirs += f
} else {
Expand Down

0 comments on commit f3c9aba

Please sign in to comment.