mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-10 23:17:27 +00:00
Expand wildcard imports in the generated Kotlin files. (#7757)
Tested: ``` $ cmake -G "Unix Makefiles" && make && ./flattests ... [ 99%] Linking CXX executable flatsamplebinary [100%] Built target flatsamplebinary ALL TESTS PASSED ``` Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -132,9 +132,22 @@ class KotlinGenerator : public BaseGenerator {
|
||||
code += "\n\n";
|
||||
}
|
||||
if (needs_includes) {
|
||||
code += "import java.nio.*\n";
|
||||
code += "import kotlin.math.sign\n";
|
||||
code += "import com.google.flatbuffers.*\n\n";
|
||||
code +=
|
||||
"import com.google.flatbuffers.BaseVector\n"
|
||||
"import com.google.flatbuffers.BooleanVector\n"
|
||||
"import com.google.flatbuffers.ByteVector\n"
|
||||
"import com.google.flatbuffers.Constants\n"
|
||||
"import com.google.flatbuffers.DoubleVector\n"
|
||||
"import com.google.flatbuffers.FlatBufferBuilder\n"
|
||||
"import com.google.flatbuffers.FloatVector\n"
|
||||
"import com.google.flatbuffers.LongVector\n"
|
||||
"import com.google.flatbuffers.StringVector\n"
|
||||
"import com.google.flatbuffers.Struct\n"
|
||||
"import com.google.flatbuffers.Table\n"
|
||||
"import com.google.flatbuffers.UnionVector\n"
|
||||
"import java.nio.ByteBuffer\n"
|
||||
"import java.nio.ByteOrder\n"
|
||||
"import kotlin.math.sign\n\n";
|
||||
}
|
||||
code += classcode;
|
||||
const std::string dirs = namer_.Directories(ns);
|
||||
|
||||
Reference in New Issue
Block a user