Skip to content

Commit

Permalink
Add validate-options.proto to ensure consistent package options
Browse files Browse the repository at this point in the history
See #70
  • Loading branch information
thesamet committed Feb 16, 2021
1 parent 6de254d commit 8529a55
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
11 changes: 11 additions & 0 deletions core/src/main/protobuf/scalapb/validate-options.proto
Original file line number Diff line number Diff line change
@@ -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
};

0 comments on commit 8529a55

Please sign in to comment.