All Projects → mirego → trikot.foundation

mirego / trikot.foundation

Licence: BSD-3-Clause license
Core utilities for Kotlin Multiplatform

Programming Languages

kotlin
9241 projects
groovy
2714 projects

Projects that are alternatives of or similar to trikot.foundation

trikot.patron
Kotlin Multiplatform Sample Project using Trikot libraries
Stars: ✭ 13 (-38.1%)
Mutual labels:  kotlin-multiplatform, trikot
trikot.http
HTTP networking abstraction for Kotlin Multiplatform
Stars: ✭ 15 (-28.57%)
Mutual labels:  kotlin-multiplatform, trikot
MultiplatformPlayground
Kotlin Multiplatform project in Jetpack Compose & SwiftUI with shared ViewModel layer and File upload
Stars: ✭ 72 (+242.86%)
Mutual labels:  kotlin-multiplatform
kmp-fatframework-cocoa
A Gradle plugin to generate and publish an iOs FatFramework or XCFramework on Kotlin Multiplatform projects.
Stars: ✭ 26 (+23.81%)
Mutual labels:  kotlin-multiplatform
multiplatform-redux-sample
blog.dreipol.ch/trash-disposal-with-kotlin-multiplattform-12abb5b5eb2c
Stars: ✭ 81 (+285.71%)
Mutual labels:  kotlin-multiplatform
KMQTT
Embeddable and standalone Kotlin Multiplatform MQTT broker
Stars: ✭ 56 (+166.67%)
Mutual labels:  kotlin-multiplatform
PreCompose
Compose Multiplatform Navigation && ViewModel
Stars: ✭ 150 (+614.29%)
Mutual labels:  kotlin-multiplatform
KotlinXcodeSync
Sync Kotlin files with an Xcode project
Stars: ✭ 25 (+19.05%)
Mutual labels:  kotlin-multiplatform
libs.kmp.icerock.dev
Kotlin Multiplatform libraries list with info auto-fetch
Stars: ✭ 178 (+747.62%)
Mutual labels:  kotlin-multiplatform
Kodein-Log
Multiplatform lightweight logging library.
Stars: ✭ 25 (+19.05%)
Mutual labels:  kotlin-multiplatform
kfsm
Finite State Machine in Kotlin
Stars: ✭ 76 (+261.9%)
Mutual labels:  kotlin-multiplatform
abc-kmm-location
Location Service Manager for Kotlin Multiplatform Mobile iOS and Android
Stars: ✭ 55 (+161.9%)
Mutual labels:  kotlin-multiplatform
chords
A Kotlin multi-platform view library for displaying stringed instrument chord diagrams
Stars: ✭ 25 (+19.05%)
Mutual labels:  kotlin-multiplatform
DagashiApp
Unofficial Android Dagashi Android/iOS app.
Stars: ✭ 32 (+52.38%)
Mutual labels:  kotlin-multiplatform
kotlin-no-backend
Lista de empresas que utilizam Kotlin no Brasil.
Stars: ✭ 46 (+119.05%)
Mutual labels:  kotlin-multiplatform
qbit
qbit is a kotlin-multiplatform embeddable decentralized DBMS with object-relational information model
Stars: ✭ 40 (+90.48%)
Mutual labels:  kotlin-multiplatform
CompleteKotlin
Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms.
Stars: ✭ 236 (+1023.81%)
Mutual labels:  kotlin-multiplatform
geok
Kotlin geometry library
Stars: ✭ 29 (+38.1%)
Mutual labels:  kotlin-multiplatform
KMP-NativeCoroutines
Library to use Kotlin Coroutines from Swift code in KMP apps
Stars: ✭ 502 (+2290.48%)
Mutual labels:  kotlin-multiplatform
island-time
A Kotlin Multiplatform library for working with dates and times
Stars: ✭ 69 (+228.57%)
Mutual labels:  kotlin-multiplatform

⚠️ Warning: this project as been moved

See the new trikot repository for releases starting from 3.0.0.

Trikot.foundation

Kotlin Multiplatform implementation of threads, timers, atomic references, string utilities and iso8601 dates.

AtomicReference and AtomicListReference

AtomicReference implementation on all platform

val atom = AtomicReference("a")
atom.compareAndSet("a", "b")
atom.setOrThrow("c", "b") // Will throw

val list = AtomicListReference<String>()
list.add("a") // Thread safely adds "a"
list.remove("a") // Thread safely removes "a"

Timers

Single and repeatable multiplatform timer implementations

 val doOnceTimer = TimerFactory.single(12.seconds) { doSomething() }
 val repeatTimer = TimerFactory.repeatable(12.seconds) { doSomething() }
 repeatTimer.cancel() // stop the timer

Strings

Multiplatform string extensions for formating, normalizing

val string = "Où sont les bûches de Noël durant l'été?".normalize()
string == "Ou sont les buches de Noel durant l'ete?" // true

Dates (Basic from and to ISO8601)

Multiplatform iso date implementation

val now = Date.now()            // GMT
val date = now + 5.seconds
val isoDate = date.toISO8601()  // yyyy-MM-dd:mm:dd:ssZ
val otherDate = Date.fromISO8601(isoDate)
otherDate == date               // true

Multiplatform freezing

Allow freezing in common code. Does nothing in js and JVM.

freeze(objectToFreeze)

In swift, use access freeze via MrFreezeKt class helper to freeze object.

MrFreezeKt.freeze(objectToFreeze: objectToFreeze)

Dispatch Queues

While waiting for Sharing of coroutines across threads in Kotlin/Native to work correctly. Trikot.foundation provide a standard Thread model based on queues. When this issue will be resolved, DispatchQueues will be converted to Coroutines.

See: Dispatch Queues

Installation

Import dependencies
    api "com.mirego.trikot:trikotFoundation:$trikot_foundation_version"
    jvm "com.mirego.trikot:trikotFoundation-jvm:$trikot_foundation_version"
    js "com.mirego.trikot:trikotFoundation-js:$trikot_foundation_version"
    android "com.mirego.trikot:trikotFoundation-android:$trikot_foundation_version"
    iosx64 "com.mirego.trikot:trikotFoundation-iosx64:$trikot_foundation_version"
    iosarm64 "com.mirego.trikot:trikotFoundation-iosarm64:$trikot_foundation_version"
    iosarm32 "com.mirego.trikot:trikotFoundation-iosarm32:$trikot_foundation_version"
    tvosx64 "com.mirego.trikot:trikotFoundation-tvosx64:$trikot_foundation_version"
    tvosarm64 "com.mirego.trikot:trikotFoundation-tvosarm64:$trikot_foundation_version"

License

Trikot.foundation is © 2018-2019 Mirego and may be freely distributed under the New BSD license. See the LICENSE.md file.

About Mirego

Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We’re a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.

We also love open-source software and we try to give back to the community as much as we can.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].