Fix generated code reference for intellij projects.

This commit is contained in:
Xudong Ma 2015-09-02 14:03:06 -07:00
parent 66b984ca9d
commit d5bd33ca1b
3 changed files with 9 additions and 24 deletions

View File

@ -74,16 +74,11 @@ applicationDistribution.into("bin") {
fileMode = 0755 fileMode = 0755
} }
// Allow intellij projects to refer to generated-sources // Let intellij projects refer to generated code
idea { idea {
module { module {
// The whole build dir is excluded by default, but we need build/generated-sources, sourceDirs += file("${projectDir}/src/generated/main/java");
// which contains the generated proto classes. sourceDirs += file("${projectDir}/src/generated/main/grpc");
excludeDirs = [file('.gradle')]
if (buildDir.exists()) {
excludeDirs += files(buildDir.listFiles())
excludeDirs -= file("$buildDir/generated-sources")
}
} }
} }

View File

@ -59,15 +59,10 @@ applicationDistribution.into("bin") {
fileMode = 0755 fileMode = 0755
} }
// Allow intellij projects to refer to generated-sources // Let intellij projects refer to generated code
idea { idea {
module { module {
// The whole build dir is excluded by default, but we need build/generated-sources, sourceDirs += file("${projectDir}/src/generated/main/java");
// which contains the generated proto classes. sourceDirs += file("${projectDir}/src/generated/main/grpc");
excludeDirs = [file('.gradle')]
if (buildDir.exists()) {
excludeDirs += files(buildDir.listFiles())
excludeDirs -= file("$buildDir/generated-sources")
}
} }
} }

View File

@ -63,15 +63,10 @@ applicationDistribution.into("bin") {
configureProtoCompilation() configureProtoCompilation()
// Allow intellij projects to refer to generated-sources // Let intellij projects refer to generated code
idea { idea {
module { module {
// The whole build dir is excluded by default, but we need build/generated-sources, sourceDirs += file("${projectDir}/src/generated/main/java");
// which contains the generated proto classes. sourceDirs += file("${projectDir}/src/generated/main/grpc");
excludeDirs = [file('.gradle')]
if (buildDir.exists()) {
excludeDirs += files(buildDir.listFiles())
excludeDirs -= file("$buildDir/generated-sources")
}
} }
} }