README.md
1# Test Only Library for Kotlin
2
3This directory (`/lib/kotlin`) contains test only library code for Kotlin code gen. Because Kotlin code gen produces code that works on top of libthrift (i.e. Java library), the purpose of this library is to encode the cross test server and client to make sure it conforms to the thrift specifications.
4
5The output artifact in this library is _not_ published to Maven central. Unlike the Java library where:
6
71. source code is put under `main` sources set i.e. `src/main`,
82. unit test code is put under `test` sources set i.e. `src/test`,
93. cross test code is put under `crossTest` sources set, i.e. `src/crossTest` directory which, unlike the default `main` and `test`, is created and configured on demand;
10
11this kotlin library uses a multi-module project setup for separation of concern:
12
131. root module for configuring unit tests,
142. `cross-test-client` module for bundling a standalone test client,
153. `cross-test-server` module for bundling a standalone test server
16
17## How to compile
18
19This library is managed using Gradle 6.9.2, run the following command (requires C++ thrift compiler):
20
21```bash
22gradle build
23```
24
25```bash
26gradle installDist
27```
28
29## How to run cross test server / client
30
31```bash
32gradle :cross-test-server:run
33```
34
35```bash
36gradle :cross-test-client:run
37```
38