File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,8 +127,20 @@ which don't include compound names, be aware that _adding_ this annotation
127127(with a value not equivalent to the default) constitutes a breaking change in
128128that language. When releasing protos, be sure that omissions are intentional.
129129
130+ ## Rationale
131+
132+ ### Java packaging options
133+
134+ Set the option, `java_multiple_files`, to true to get a cleaner file structure.
135+ Doing so instructs `protoc` to create one output file per Protobuf type, which
136+ allows for more fine-grained imports. The option, `java_outer_classname`, is
137+ required in combination with `java_multiple_files`. It instructs `protoc` to
138+ wrap each compiled Protobuf type in a Java class whose name is the value of the
139+ option. This prevents potential naming collisions between generated types.
140+
130141## Changelog
131142
143+ - **2024-06-05**: Added rationale for Java packaging options.
132144- **2023-02-24**: Added guidance on protobuf syntax.
133145- **2022-10-18**: Added guidance on Ruby/PHP/C# options.
134146- **2019-11-18**: Added guidance on the packaging annotations.
You can’t perform that action at this time.
0 commit comments