/protobuf-kotlin

A working example of the code from https://protobuf.dev/getting-started/kotlintutorial/

Primary LanguageKotlinOtherNOASSERTION

Protobuf with kotlin

This repo is an example of using protobuf with kotlin.

Motive

The code on https://protobuf.dev/getting-started/kotlintutorial/ (SHA 05baf19) simply doesn't compile and the required dependencies were not documented.

This repo provides a working example of using protobuf with kotlin. It fixes the errors and issues present here.

How to run

You may need java 1.8 or later; openjdk version "1.8.0_362" was used to compile this.

Using IntelliJ IDEA

Simply run Add Person and List Person configs in IntelliJ IDEA

img.png

On the command line

./gradlew run --args='add_person address_book.txt' --console=plain
./gradlew run --args='list_person address_book.txt'