Link Search Menu Expand Document

Project Setup

To use fritz2, you have to set up a Kotlin multiplatform-project. To do so you can either

plugins {
    id("dev.fritz2.fritz2-gradle") version "0.10"
}

repositories {
    mavenCentral()
}

kotlin {
    jvm()
    js(IR) {
        browser()
    }.binaries.executable()

    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation("dev.fritz2:core:0.10")
                // see https://components.fritz2.dev/
                // implementation("dev.fritz2:components:0.10")
            }
        }
        val jvmMain by getting {
            dependencies {
            }
        }
        val jsMain by getting {
            dependencies {
            }
        }
    }
}

Pre-release builds

If you want to use the newest snapshot-builds of fritz2 before we release them add the following lines to your build.gradle.kts:

plugins {
    id("dev.fritz2.fritz2-gradle") version "0.10"
}

repositories {
    mavenCentral()
    maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") // new repository here
}

kotlin {
    jvm()
    js(IR) {
        browser()
    }.binaries.executable()

    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation("dev.fritz2:core:0.11-SNAPSHOT") // add the newer snapshot version here
                // implementation("dev.fritz2:components:0.11-SNAPSHOT")
            }
        }
        ...
    }
}

If you find any problems with these snapshot-versions please open an issue.


Distributed by a MIT license.