This commit contains the initial implementation of Flexbuffers in Kotlin. The code...
authorPaulo Pinheiro <paulovictor.pinheiro@gmail.com>
Thu, 28 Jan 2021 22:49:25 +0000 (23:49 +0100)
committerGitHub <noreply@github.com>
Thu, 28 Jan 2021 22:49:25 +0000 (14:49 -0800)
commit6d91096a2f4f93944092242d7a5d540684dce178
tree0bcc491cbc45c873b54d0bf7b0ff205d369121cb
parent13d9e35858fe8c96f7244bf0e4b66af2b24b59f3
This commit contains the initial implementation of Flexbuffers in Kotlin. The code was ported based (#6387)

on the current Java Implementation.

The code dependencies related to JVM were removed and the project is able to target all available platforms.

The only requirement to implement to fully support a target is to implement functions described in `ByteArray.kt`.
Right now the code support JVM and native targets. JS port still missing, but just be trivial to introduce.

Currently, only the `jvm` and `macosX64` targets are enabled until we figure out how to enable tests on all
platforms on CI.

A submodule called "benchmark" is also introduced. It contains a series
of benchmarks comparing Java and Kotlin implementations of FlexBuffers and the UTF8 API.

Finally, this commit does not contain the scripts necessary to publish the artifacts. This will
be introduced at a later stage once the team has an agreement on how to rollout Kotlin releases.
25 files changed:
.github/workflows/build.yml
kotlin/benchmark/build.gradle.kts [new file with mode: 0644]
kotlin/benchmark/src/jvmMain/java [new symlink]
kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/FlexBuffersBenchmark.kt [new file with mode: 0644]
kotlin/benchmark/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/benchmark/UTF8Benchmark.kt [new file with mode: 0644]
kotlin/build.gradle.kts [new file with mode: 0644]
kotlin/flatbuffers-kotlin/build.gradle.kts [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Buffers.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffers.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersBuilder.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/FlexBuffersInternals.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/commonMain/kotlin/com/google/flatbuffers/kotlin/Utf8.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/ByteArrayTest.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/commonTest/kotlin/com/google/flatbuffers/kotlin/FlexBuffersTest.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/jvmMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/jvmTest/kotlin/com/google/flatbuffers/kotlin/Utf8Test.kt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/jvmTest/resources/utf8_sample.txt [new file with mode: 0644]
kotlin/flatbuffers-kotlin/src/nativeMain/kotlin/com/google/flatbuffers/kotlin/ByteArray.kt [new file with mode: 0644]
kotlin/gradle/wrapper/gradle-wrapper.jar [new file with mode: 0644]
kotlin/gradle/wrapper/gradle-wrapper.properties [new file with mode: 0644]
kotlin/gradlew [new file with mode: 0755]
kotlin/gradlew.bat [new file with mode: 0644]
kotlin/settings.gradle [new file with mode: 0644]
kotlin/spotless/spotless.kt [new file with mode: 0644]