Skip to content

Commit 1844e28

Browse files
committed
Update documentation to avoid duplicate protoSources
1 parent 514438b commit 1844e28

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ will look like this:
3030
lazy val root = (project in file("."))
3131
.enablePlugins(ProtofetchPlugin)
3232
.settings(
33-
// Use protofetch output as a sbt-protoc source
33+
// Use protofetch output as a sbt-protoc source.
34+
// Remove this line if you use "target/protobuf_external_src" as proto_out_dir in your protofetch.toml
3435
Compile / PB.protoSources += protofetchOutputDirectory.value,
36+
37+
// Fetch proto files before running code generators
3538
Compile / PB.generate := (Compile / PB.generate).dependsOn(protofetchFetch).value,
3639

3740
// The rest of the sbt-protoc configuration
@@ -83,7 +86,6 @@ lazy val grpcDeps = (project in file("grpc-deps"))
8386
.enablePlugins(ProtofetchPlugin)
8487
.settings(
8588
protofetchModuleFile := baseDirectory.value / ".." / "protofetch.toml",
86-
Compile / PB.protoSources += protofetchOutputDirectory.value,
8789
Compile / PB.targets := Seq(
8890
scalapb.gen(grpc = true) -> (Compile / sourceManaged).value / "scalapb",
8991
scalapb.zio_grpc.ZioCodeGenerator -> (Compile / sourceManaged).value / "scalapb"
@@ -105,3 +107,4 @@ Note that this snippet is a drop-in replacement of what `sbt-protodep` does.
105107
You don't necessarily need to have a dedicated `grpcDeps` sbt project,
106108
these settings can as well be applied to some already existing project.
107109
Also, you may not need all `libraryDependencies` that `sbt-protodep` used to add.
110+
****

0 commit comments

Comments
 (0)