Skip to content

Commit

Permalink
added marker interface option to service DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Nov 30, 2018
1 parent 3b8eeeb commit f72ba87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![coverage](https://coveralls.io/repos/daviddenton/protokruft/badge.svg?branch=master)](https://coveralls.io/github/daviddenton/protokruft?branch=master)
[![kotlin](https://img.shields.io/badge/kotlin-1.2-blue.svg)](http://kotlinlang.org)
[![kotlin](https://img.shields.io/badge/kotlin-1.3-blue.svg)](http://kotlinlang.org)
[![build status](https://travis-ci.org/daviddenton/protokruft.svg?branch=master)](https://travis-ci.org/daviddenton/protokruft)
[![bintray version](https://api.bintray.com/packages/daviddenton/maven/protokruft/images/download.svg)](https://bintray.com/daviddenton/maven/protokruft/_latestVersion)

Expand Down Expand Up @@ -101,6 +101,8 @@ val newBlockingStub = CarService.Grpc.Client(channel)
val grpcService= CarService.Grpc.Server(myCarServiceImplementation)
```

Optionally, you can also add a `markerInterface` option to aid IDE navigability.

## Use it:
Merge the following sections into your Gradle file. This assumes that you've already got Protobuf classes being generated by the `protobuf-gradle-plugin`:
```groovy
Expand All @@ -122,6 +124,7 @@ Merge the following sections into your Gradle file. This assumes that you've alr
messageDslPrefix = "customPrefix" // "new" by default
serviceClassFile = "customService" // "serviceDsl" by default
serviceDslSuffix = "CustomSuffix" // "" by default
markerInterface = "com.my.great.Interface" // null by default
}
// allows you to just run generateProtoDsl
Expand Down

0 comments on commit f72ba87

Please sign in to comment.