Skip to content

Instantly share code, notes, and snippets.

View AlexeyErofeev's full-sized avatar

AlexeyErofeev

View GitHub Profile
import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.*
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.descriptors.serialDescriptor
import kotlinx.serialization.encodeToString
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import kotlinx.serialization.json.*
@AlexeyErofeev
AlexeyErofeev / MainActivity.kt
Last active March 2, 2022 21:24
"parcel hentai" - parcel with polymorphic field thrue parcelize
package com.example.parcel_hentai
import android.app.Activity
import android.os.Bundle
import android.os.Parcel
import android.os.Parcelable
import android.util.Log
import kotlinx.android.parcel.Parceler
import kotlinx.android.parcel.Parcelize
@AlexeyErofeev
AlexeyErofeev / module.build.gradle.kts
Last active December 3, 2021 16:56
run your task after idea/studio gradle sync/reload with kotlin gradle dsl
// .. module script, for example android module
tasks.create<Task>("androidAfterSync") {
doLast {
println("android after sync")
}
}
// push your target module task by root trigger
rootProject.tasks.getByName("afterSyncTask")