Fix dependency

This commit is contained in:
Him188 2020-03-04 12:23:33 +08:00
parent 8cefb73033
commit b62151ea6e
2 changed files with 4 additions and 2 deletions

View File

@ -106,6 +106,7 @@ kotlin {
dependencies {
runtimeOnly(files("build/classes/kotlin/jvm/main")) // classpath is not properly set by IDE
api(kotlinx("serialization-runtime", serializationVersion))
api(kotlinx("serialization-protobuf", serializationVersion))
}
}
@ -114,7 +115,6 @@ kotlin {
api(kotlin("test", kotlinVersion))
api(kotlin("test-junit", kotlinVersion))
implementation("org.pcap4j:pcap4j-distribution:1.8.2")
api(kotlinx("serialization-protobuf", serializationVersion))
runtimeOnly(files("build/classes/kotlin/jvm/main")) // classpath is not properly set by IDE
runtimeOnly(files("build/classes/kotlin/jvm/test")) // classpath is not properly set by IDE

View File

@ -139,7 +139,9 @@ class Jce private constructor(private val charset: JceCharset, override val cont
}
serializer.descriptor == ByteArraySerializer() -> encodeTaggedByteArray(popTag(), value as ByteArray)
serializer.descriptor.kind == StructureKind.LIST
&& serializer.descriptor.elementDescriptors()[0].kind is PrimitiveKind -> {
&& serializer.descriptor.elementDescriptors()[0].kind is PrimitiveKind
&& value !is ArrayList<*>
&& value !is Array<*> -> {
serializer.serialize(
ListWriter(
when (value) {