Skip to content

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 <[email protected]>
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