Releases: AAkira/Napier
Releases · AAkira/Napier
2.0.0-alpha2
Support apple artifacts
- macOS
- watchOS
- tvOS
2.0.0-alpha1
- Update Kotlin 1.5.21
- Run on other threads 🎉
Thanks @PhilipDukhov
Example
You can use this library on a background thread on iOS using Kotlin.coroutines as native-mt.
- Define coroutine scopes
internal val mainScope = SharedScope(Dispatchers.Main)
internal val backgroundScope = SharedScope(Dispatchers.Default)
internal class SharedScope(private val context: CoroutineContext) : CoroutineScope {
private val job = Job()
private val exceptionHandler = CoroutineExceptionHandler { _, throwable ->
println("[Coroutine Exception] $throwable")
}
override val coroutineContext: CoroutineContext
get() = context + job + exceptionHandler
}
- Usage
backgroundScope.launch {
suspendFunction()
}
1.5.0
Changes
Kotlin1.5
Update Kotlin 1.5 🎉
Upload artifacts to the maven central.
cf.Maven central rules
com.github.aakira
=> io.github.aakira
sourceSets {
val commonMain by getting {
dependencies {
implementation("io.github.aakira:napier:1.5.0")
}
}
}
1.4.1
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
Happy announcement!
Napier is 1.0.0
It has iOS artifact included x64, arm64, and arm32.
You can call this.
- after
dependencies {
// include x64, arm64, arm32
implementation "com.github.aakira:napier-ios:$napierVersion"
}
- before
dependencies {
// x64
implementation 'com.github.aakira:napier-iosX64:$napierVersion'
// arm
implementation 'com.github.aakira:napier-iosArm32:$napierVersion'
implementation 'com.github.aakira:napier-iosArm64:$napierVersion'
}