Skip to content

Commit

Permalink
add kotlin code gen
Browse files Browse the repository at this point in the history
skip ci
  • Loading branch information
Jiayu Liu authored and jimexist committed Apr 17, 2022
1 parent 90ea2e8 commit 57ec4a8
Show file tree
Hide file tree
Showing 27 changed files with 4,500 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -113,6 +113,10 @@ if(BUILD_JAVASCRIPT)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/js)
endif()

if(BUILD_KOTLIN)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/kotlin)
endif()

if(BUILD_NODEJS)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/nodejs)
endif()
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Expand Up @@ -78,7 +78,7 @@ empty :=
space := $(empty) $(empty)
comma := ,

CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@ @MAYBE_RS@ @MAYBE_NETSTD@ @MAYBE_NODETS@
CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@ @MAYBE_RS@ @MAYBE_NETSTD@ @MAYBE_NODETS@ @MAYBE_KOTLIN@
CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))

if WITH_PY3
Expand Down
3 changes: 2 additions & 1 deletion build/cmake/FindGradlew.cmake
Expand Up @@ -21,7 +21,8 @@
# GRADLEW_FOUND - system has Gradlew
# GRADLEW_EXECUTABLE - the Gradlew executable
#
# It will search the location CMAKE_SOURCE_DIR/lib/java
# It will search the location CMAKE_SOURCE_DIR/lib/java, the location CMAKE_SOURCE_DIR/lib/kotlin
# also uses gradle wrapper but it symoblically links to the lib/java one

include(FindPackageHandleStandardArgs)

Expand Down
1 change: 1 addition & 0 deletions compiler/cpp/CMakeLists.txt
Expand Up @@ -87,6 +87,7 @@ THRIFT_ADD_COMPILER(java "Enable compiler for Java" ON)
THRIFT_ADD_COMPILER(javame "Enable compiler for Java ME" ON)
THRIFT_ADD_COMPILER(js "Enable compiler for JavaScript" ON)
THRIFT_ADD_COMPILER(json "Enable compiler for JSON" ON)
THRIFT_ADD_COMPILER(kotlin "Enable compiler for Kotlin" ON)
THRIFT_ADD_COMPILER(lua "Enable compiler for Lua" ON)
THRIFT_ADD_COMPILER(netstd "Enable compiler for .NET Standard" ON)
THRIFT_ADD_COMPILER(ocaml "Enable compiler for OCaml" ON)
Expand Down
1 change: 1 addition & 0 deletions compiler/cpp/Makefile.am
Expand Up @@ -84,6 +84,7 @@ thrift_SOURCES += src/thrift/generate/t_c_glib_generator.cc \
src/thrift/generate/t_javame_generator.cc \
src/thrift/generate/t_js_generator.cc \
src/thrift/generate/t_json_generator.cc \
src/thrift/generate/t_kotlin_generator.cc \
src/thrift/generate/t_lua_generator.cc \
src/thrift/generate/t_netstd_generator.cc \
src/thrift/generate/t_netstd_generator.h \
Expand Down
3 changes: 2 additions & 1 deletion compiler/cpp/compiler.vcxproj
Expand Up @@ -69,6 +69,7 @@
<ClCompile Include="src\thrift\generate\t_javame_generator.cc" />
<ClCompile Include="src\thrift\generate\t_js_generator.cc" />
<ClCompile Include="src\thrift\generate\t_json_generator.cc" />
<ClCompile Include="src\thrift\generate\t_kotlin_generator.cc" />
<ClCompile Include="src\thrift\generate\t_lua_generator.cc" />
<ClCompile Include="src\thrift\generate\t_netstd_generator.cc" />
<ClCompile Include="src\thrift\generate\t_ocaml_generator.cc" />
Expand Down Expand Up @@ -246,4 +247,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
3 changes: 3 additions & 0 deletions compiler/cpp/compiler.vcxproj.filters
Expand Up @@ -140,6 +140,9 @@
<ClCompile Include="src\generate\t_js_generator.cc">
<Filter>generate</Filter>
</ClCompile>
<ClCompile Include="src\generate\t_kotlin_generator.cc">
<Filter>generate</Filter>
</ClCompile>
<ClCompile Include="src\generate\t_ocaml_generator.cc">
<Filter>generate</Filter>
</ClCompile>
Expand Down

0 comments on commit 57ec4a8

Please sign in to comment.