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 #474
  • Loading branch information
oehme authored and ejona86 committed Jun 17, 2021
1 parent 46825f9 commit 0e24de2
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 0e24de2

Please sign in to comment.