blob: 37d8577c7bbd71add4d9624b1f6624c62f2814f7 [file] [log] [blame] [view]
Jiayu Liu49b2d6b2022-04-06 16:49:09 +08001# 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
Jiayu Liu5fdfd0c2022-05-09 10:52:26 +08005The 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
Jiayu Liu49b2d6b2022-04-06 16:49:09 +080016
17## How to compile
18
Jiayu Liu5fdfd0c2022-05-09 10:52:26 +080019This library is managed using Gradle 6.9.2, run the following command (requires C++ thrift compiler):
Jiayu Liu49b2d6b2022-04-06 16:49:09 +080020
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```