thrift/lib/kotlin
2022-12-16 00:09:39 +08:00
..
cross-test-client 源码提交 2022-12-16 00:09:39 +08:00
cross-test-server 源码提交 2022-12-16 00:09:39 +08:00
src/test 源码提交 2022-12-16 00:09:39 +08:00
build.gradle.kts 源码提交 2022-12-16 00:09:39 +08:00
CMakeLists.txt 源码提交 2022-12-16 00:09:39 +08:00
gradle.properties 源码提交 2022-12-16 00:09:39 +08:00
Makefile.am 源码提交 2022-12-16 00:09:39 +08:00
README.md 源码提交 2022-12-16 00:09:39 +08:00
settings.gradle.kts 源码提交 2022-12-16 00:09:39 +08:00

Test Only Library for Kotlin

This 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.

The output artifact in this library is not published to Maven central. Unlike the Java library where:

  1. source code is put under main sources set i.e. src/main,
  2. unit test code is put under test sources set i.e. src/test,
  3. 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;

this kotlin library uses a multi-module project setup for separation of concern:

  1. root module for configuring unit tests,
  2. cross-test-client module for bundling a standalone test client,
  3. cross-test-server module for bundling a standalone test server

How to compile

This library is managed using Gradle 6.9.2, run the following command (requires C++ thrift compiler):

gradle build
gradle installDist

How to run cross test server / client

gradle :cross-test-server:run
gradle :cross-test-client:run