Skip to content

Commit 11026b6

Browse files
author
Louis Ryan
committed
Fix IntelliJ dependency on generated protobufs
1 parent 4de2026 commit 11026b6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

integration-testing/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'protobuf'
2+
apply plugin: 'idea'
23

34
description = "Stubby: Integration Testing"
45

@@ -21,3 +22,14 @@ dependencies {
2122
libraries.junit,
2223
libraries.mockito
2324
}
25+
26+
// Allow intellij projects to refer to generated-sources
27+
idea {
28+
module {
29+
// The whole build dir is excluded by default, but we need build/generated-sources,
30+
// which contains the generated proto classes.
31+
excludeDirs = [file('.gradle')]
32+
excludeDirs += files(file("$buildDir/").listFiles())
33+
excludeDirs -= file("$buildDir/generated-sources")
34+
}
35+
}

0 commit comments

Comments
 (0)