GithubHelp home page GithubHelp logo

nmalkin / generate-kotlin-grpc-from-protos Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 4 KB

minimal Gradle buildscript to generate Kotlin GRPC stubs from protobuf code

License: Creative Commons Zero v1.0 Universal

Makefile 4.52% Kotlin 95.48%
kotlin gradle grpc proto protobuf

generate-kotlin-grpc-from-protos's Introduction

Minimal build.gradle.kts for compiling protos & generating Kotlin stub code for GRPC

This is a barebones repo showing how to generate Kotlin stub code and compile protos for GRPC from a Gradle buildscript (build.gradle.kts).

Here's what you need to do:

  1. Put your proto files in src/main/proto
  2. gradle generateProto
  3. Look for the generated files in build/generated/source/proto/main

Rationale

The official gRPC guide to Kotlin refers to the collection of gRPC Kotlin examples for compiling protos and generating stub code. However, the examples have several projects all together and are therefore kind of complicated. What is the minimal build.gradle.kts necessary to automatically generate proto code and stub methods? That is what this repo attempts to provide.

Notes

  • Newer versions of the plugins and dependencies may be available by the time you see this.
  • The Gradle buildscript includes just enough to generate the stub code. You'll need additional dependencies to compile them; at a minimum, the Kotlin and Protobuf libraries.

generate-kotlin-grpc-from-protos's People

Contributors

nmalkin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.