Merge pull request #121 from InsanusMokrassar/0.9.0

0.9.0
This commit is contained in:
InsanusMokrassar 2021-12-30 02:52:34 +06:00 committed by GitHub
commit ed9ebdbd1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 25 deletions

View File

@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-java@v1 - uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 11
- name: Fix android 32.0.0 dx - name: Fix android 32.0.0 dx
continue-on-error: true continue-on-error: true
run: cd /usr/local/lib/android/sdk/build-tools/32.0.0/ && mv d8 dx && cd lib && mv d8.jar dx.jar run: cd /usr/local/lib/android/sdk/build-tools/32.0.0/ && mv d8 dx && cd lib && mv d8.jar dx.jar

1
.gitignore vendored
View File

@ -11,5 +11,6 @@ out/
secret.gradle secret.gradle
local.properties local.properties
kotlin-js-store
publishing.sh publishing.sh

View File

@ -1,5 +1,15 @@
# Changelog # Changelog
## 0.9.0
* `Versions`:
* `Kotlin`: `1.5.31` -> `1.6.10`
* `Coroutines`: `1.5.2` -> `1.6.0`
* `Serialization`: `1.3.1` -> `1.3.2`
* `Exposed`: `0.36.2` -> `0.37.2`
* `Ktor`: `1.6.5` -> `1.6.7`
* `Klock`: `2.4.8` -> `2.4.10`
## 0.8.9 ## 0.8.9
* `Ktor`: * `Ktor`:

View File

@ -7,7 +7,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.1.3' classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:$dexcount_version" classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:$dexcount_version"

View File

@ -32,8 +32,7 @@ class EitherSerializer<T1, T2>(
t1Serializer: KSerializer<T1>, t1Serializer: KSerializer<T1>,
t2Serializer: KSerializer<T2>, t2Serializer: KSerializer<T2>,
) : KSerializer<Either<T1, T2>> { ) : KSerializer<Either<T1, T2>> {
@ExperimentalSerializationApi @OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
@InternalSerializationApi
override val descriptor: SerialDescriptor = buildSerialDescriptor( override val descriptor: SerialDescriptor = buildSerialDescriptor(
"TypedSerializer", "TypedSerializer",
SerialKind.CONTEXTUAL SerialKind.CONTEXTUAL
@ -44,8 +43,7 @@ class EitherSerializer<T1, T2>(
private val t1EitherSerializer = EitherFirst.serializer(t1Serializer, t2Serializer) private val t1EitherSerializer = EitherFirst.serializer(t1Serializer, t2Serializer)
private val t2EitherSerializer = EitherSecond.serializer(t1Serializer, t2Serializer) private val t2EitherSerializer = EitherSecond.serializer(t1Serializer, t2Serializer)
@ExperimentalSerializationApi @OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
@InternalSerializationApi
override fun deserialize(decoder: Decoder): Either<T1, T2> { override fun deserialize(decoder: Decoder): Either<T1, T2> {
return decoder.decodeStructure(descriptor) { return decoder.decodeStructure(descriptor) {
var type: String? = null var type: String? = null
@ -77,8 +75,7 @@ class EitherSerializer<T1, T2>(
} }
@ExperimentalSerializationApi @OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
@InternalSerializationApi
override fun serialize(encoder: Encoder, value: Either<T1, T2>) { override fun serialize(encoder: Encoder, value: Either<T1, T2>) {
encoder.encodeStructure(descriptor) { encoder.encodeStructure(descriptor) {
when (value) { when (value) {

View File

@ -7,14 +7,14 @@ android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
org.gradle.jvmargs=-Xmx2g org.gradle.jvmargs=-Xmx2g
kotlin_version=1.5.31 kotlin_version=1.6.10
kotlin_coroutines_version=1.5.2 kotlin_coroutines_version=1.6.0
kotlin_serialisation_core_version=1.3.1 kotlin_serialisation_core_version=1.3.2
kotlin_exposed_version=0.36.2 kotlin_exposed_version=0.37.2
ktor_version=1.6.5 ktor_version=1.6.7
klockVersion=2.4.8 klockVersion=2.4.10
github_release_plugin_version=2.2.12 github_release_plugin_version=2.2.12
@ -40,10 +40,10 @@ crypto_js_version=4.1.1
# Dokka # Dokka
dokka_version=1.5.31 dokka_version=1.6.0
# Project data # Project data
group=dev.inmo group=dev.inmo
version=0.8.9 version=0.9.0
android_code_version=89 android_code_version=90

View File

@ -11,8 +11,7 @@ open class TypedSerializer<T : Any>(
presetSerializers: Map<String, KSerializer<out T>> = emptyMap(), presetSerializers: Map<String, KSerializer<out T>> = emptyMap(),
) : KSerializer<T> { ) : KSerializer<T> {
protected val serializers = presetSerializers.toMutableMap() protected val serializers = presetSerializers.toMutableMap()
@ExperimentalSerializationApi @OptIn(InternalSerializationApi::class)
@InternalSerializationApi
override val descriptor: SerialDescriptor = buildSerialDescriptor( override val descriptor: SerialDescriptor = buildSerialDescriptor(
"TypedSerializer", "TypedSerializer",
SerialKind.CONTEXTUAL SerialKind.CONTEXTUAL
@ -21,8 +20,7 @@ open class TypedSerializer<T : Any>(
element("value", ContextualSerializer(kClass).descriptor) element("value", ContextualSerializer(kClass).descriptor)
} }
@ExperimentalSerializationApi @OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
@InternalSerializationApi
override fun deserialize(decoder: Decoder): T { override fun deserialize(decoder: Decoder): T {
return decoder.decodeStructure(descriptor) { return decoder.decodeStructure(descriptor) {
var type: String? = null var type: String? = null
@ -46,14 +44,12 @@ open class TypedSerializer<T : Any>(
} }
} }
@ExperimentalSerializationApi @OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
@InternalSerializationApi
protected open fun <O: T> CompositeEncoder.encode(value: O) { protected open fun <O: T> CompositeEncoder.encode(value: O) {
encodeSerializableElement(descriptor, 1, value::class.serializer() as KSerializer<O>, value) encodeSerializableElement(descriptor, 1, value::class.serializer() as KSerializer<O>, value)
} }
@ExperimentalSerializationApi @OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
@InternalSerializationApi
override fun serialize(encoder: Encoder, value: T) { override fun serialize(encoder: Encoder, value: T) {
encoder.encodeStructure(descriptor) { encoder.encodeStructure(descriptor) {
val valueSerializer = value::class.serializer() val valueSerializer = value::class.serializer()