Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded version of kotlin and serialization #154

Merged
merged 1 commit into from
Oct 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/com/akuleshov7/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"PACKAGE_NAME_INCORRECT_PATH")

object Versions {
const val KOTLIN = "1.7.10"
const val KOTLIN = "1.7.20"
const val JUNIT = "5.7.1"
const val OKIO = "3.1.0"
const val SERIALIZATION = "1.3.3"
const val SERIALIZATION = "1.4.1"
}
4 changes: 2 additions & 2 deletions ktoml-core/src/commonMain/kotlin/com/akuleshov7/ktoml/Toml.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import kotlinx.serialization.modules.SerializersModule
public open class Toml(
protected val inputConfig: TomlInputConfig = TomlInputConfig(),
protected val outputConfig: TomlOutputConfig = TomlOutputConfig(),
override val serializersModule: SerializersModule = EmptySerializersModule
override val serializersModule: SerializersModule = EmptySerializersModule(),
) : StringFormat {
// parser and writer are created once after the creation of the class, to reduce
// the number of created parsers and writers for each toml
Expand All @@ -39,7 +39,7 @@ public open class Toml(
)
public constructor(
config: TomlConfig,
serializersModule: SerializersModule = EmptySerializersModule
serializersModule: SerializersModule = EmptySerializersModule(),
) : this(
config.input,
config.output,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class TomlArrayDecoder(
) : TomlAbstractDecoder() {
private var nextElementIndex = 0
private val list = rootNode.value.content as List<TomlValue>
override val serializersModule: SerializersModule = EmptySerializersModule
override val serializersModule: SerializersModule = EmptySerializersModule()
private lateinit var currentElementDecoder: TomlPrimitiveDecoder
private lateinit var currentPrimitiveElementOfArray: TomlValue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class TomlMainDecoder(
private val config: TomlInputConfig,
private var elementIndex: Int = 0
) : TomlAbstractDecoder() {
override val serializersModule: SerializersModule = EmptySerializersModule
override val serializersModule: SerializersModule = EmptySerializersModule()

@Deprecated(
message = "TomlConfig is deprecated; use TomlInputConfig instead. Will be removed in next releases."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import kotlinx.serialization.modules.SerializersModule
public class TomlPrimitiveDecoder(
private val rootNode: TomlKeyValuePrimitive,
) : TomlAbstractDecoder() {
override val serializersModule: SerializersModule = EmptySerializersModule
override val serializersModule: SerializersModule = EmptySerializersModule()
override fun decodeValue(): Any = rootNode.value.content
override fun decodeElementIndex(descriptor: SerialDescriptor): Int = 0
override fun decodeKeyValue(): TomlKeyValue = rootNode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public open class TomlFileReader : Toml {
public constructor(
inputConfig: TomlInputConfig = TomlInputConfig(),
outputConfig: TomlOutputConfig = TomlOutputConfig(),
serializersModule: SerializersModule = EmptySerializersModule
serializersModule: SerializersModule = EmptySerializersModule(),
) : super(
inputConfig,
outputConfig,
Expand All @@ -34,7 +34,7 @@ public open class TomlFileReader : Toml {
)
public constructor(
config: TomlConfig,
serializersModule: SerializersModule = EmptySerializersModule
serializersModule: SerializersModule = EmptySerializersModule(),
) : super(
config,
serializersModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public open class TomlFileWriter : Toml {
public constructor(
inputConfig: TomlInputConfig = TomlInputConfig(),
outputConfig: TomlOutputConfig = TomlOutputConfig(),
serializersModule: SerializersModule = EmptySerializersModule
serializersModule: SerializersModule = EmptySerializersModule(),
) : super(
inputConfig,
outputConfig,
Expand All @@ -34,7 +34,7 @@ public open class TomlFileWriter : Toml {
)
public constructor(
config: TomlConfig = TomlConfig(),
serializersModule: SerializersModule = EmptySerializersModule
serializersModule: SerializersModule = EmptySerializersModule(),
) : super(
config,
serializersModule
Expand Down