0

我有一个项目:

lazy val root = project
  .in(file("."))
  .settings( ...

我希望将 ScalaPB 添加到项目中,我需要添加:

PB.targets in Compile := Seq(
    scalapb.gen(grpc = true) -> (sourceManaged in Compile).value,
    scalapb.zio_grpc.ZioCodeGenerator -> (sourceManaged in Compile).value,
)

如何将其添加到惰性验证项目中?

4

1 回答 1

4

这应该有效:

lazy val root = project
  .in(file("."))
  .settings(
    PB.targets in Compile := Seq(
      scalapb.gen(grpc = true) -> (sourceManaged in Compile).value,
      scalapb.zio_grpc.ZioCodeGenerator -> (sourceManaged in Compile).value
    )
  )
于 2020-12-04T11:23:01.033 回答