Skip to content

Add option to remove enum prefix#28

Open
sh-cho wants to merge 1 commit intoDogacel:mainfrom
sh-cho:issue-21
Open

Add option to remove enum prefix#28
sh-cho wants to merge 1 commit intoDogacel:mainfrom
sh-cho:issue-21

Conversation

@sh-cho
Copy link

@sh-cho sh-cho commented Jan 19, 2026

Motivation

In protobuf, enum names should always prefixed by ENUM_NAME_ in order to support C++ codegen.
Stripping the prefixes would be beneficial for kotlin code.

Modification

  • add remove_enum_prefix option (default is false for backward compatibility)
    generateProtoTasks {
        all().forEach {
            it.plugins {
                id("kotlinx-protobuf-gen") {
                    option("remove_enum_prefix") // <-- this
                }
            }
        }
    }

Result

Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Prettify enum names

1 participant