Install

Canard uses the new gradle native dependency model. Thus, we highly recommend to use 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.

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:0.16.0")
            }
        }
    }
}

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:0.16.0")
}

JavaScript

Add the Maven Central repository:

repositories {
    mavenCentral()
}

Then add the dependency:

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