diff --git a/build.sbt b/build.sbt index 67150e6..836761f 100644 --- a/build.sbt +++ b/build.sbt @@ -48,7 +48,11 @@ lazy val core = projectMatrix Compile / PB.targets := Seq( PB.gens.java -> (Compile / sourceManaged).value / "scalapb", scalapb.gen() -> (Compile / sourceManaged).value / "scalapb" - ) + ), + Compile / packageBin / packageOptions += { + Package.ManifestAttributes("ScalaPB-Options-Proto" -> + "scalapb/validate-options.proto") + } ) .jvmPlatform(scalaVersions = Seq(Scala212, Scala213)) diff --git a/core/src/main/protobuf/scalapb/validate-options.proto b/core/src/main/protobuf/scalapb/validate-options.proto new file mode 100644 index 0000000..392b8fa --- /dev/null +++ b/core/src/main/protobuf/scalapb/validate-options.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +package scalapb.validate; + +import "scalapb/scalapb.proto"; +option (scalapb.options) = { + scope: PACKAGE + flat_package: false + lenses: true + java_conversions: true + preserve_unknown_fields: true +};