Install

Canard uses the new Gradle native dependency model. Thus, we highly recommend using Gradle 6 or higher.

Kotlin/Multiplatform

Canard supports the following targets:
jvm, iosArm32, iosArm64, iosX64, JS, tvosarm64, tvosx64, watchosarm32, watchosarm64, watchosx86, linuxArm32Hfp, linuxMips32, linuxMipsel32, linuxX64, macosX64, mingwX64, wasmJs.
Since Kotlin 1.8, legacy backend has been deprecated, thus starting from 0.17.0, Canard is only available for JS-IR.

In your build.gradle.kts file, add the Maven Central repository:

repositories {
    mavenCentral()
}

Then add the dependency:

kotlin {
    sourceSets {
        commonMain {
            dependencies {
                implementation("org.kodein.log:canard:1.1.1")
            }
        }
    }
}

If you are NOT using Gradle 6+, you should declare the use of the Gradle Metadata experimental feature

settings.gradle.kts
enableFeaturePreview("GRADLE_METADATA")

JVM & Android

On the JVM, Canard is compatible with both standard JVM and Android environments, with the same configuration.

First, add the Maven Central repository:

repositories {
    mavenCentral()
}

Then add the dependency:

dependencies {
    implementation("org.kodein.log:canard-jvm:1.1.1")
}

JavaScript

Add the Maven Central repository:

repositories {
    mavenCentral()
}

Then add the dependency:

dependencies {
    implementation("org.kodein.log:canard-js:1.1.1")
}