buildscript {

    ext.buildMaven = { p -> repositories { maven { url p } } }


    repositories {
        mavenLocal()
        google()
        jcenter()
        mavenCentral()
    }

    dependencies {
        classpath "de.jensklingenberg:nativegradle:1.0.0"

    }

}
plugins {
    id 'org.jetbrains.kotlin.multiplatform' version '1.5.10'
}


System.setProperty("kotlin.compiler.execution.strategy", "in-process") // For debugging

allprojects {
    repositories {
        mavenLocal()
        mavenCentral()
        google()

        maven { url "https://maven.google.com" }
        maven { url "https://plugins.gradle.org/m2/" }
    }
}


apply plugin: 'de.jensklingenberg.nativeplugin'




allprojects {
    ext.buildMaven = { p -> repositories { maven { url p } } }

    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://maven.google.com" }
        maven { url "https://plugins.gradle.org/m2/" }
        google()
        jcenter()


    }
}


kotlin {

    linuxX64("linux") {
        configure([compilations.main]) {
            tasks.getByName(compileKotlinTaskName).kotlinOptions {

            }
        }
    }
    sourceSets {
        commonMain {
            dependencies {
                implementation kotlin('stdlib-common')
                implementation project(":nativedemo-annotations")

            }
        }
        commonTest {
            dependencies {
                implementation kotlin('test-common')

            }
        }

        linuxMain {


        }

    }
}


build{
    dependsOn ':nativedemo-annotations:publishToMavenLocal'
}

// workaround for https://youtrack.jetbrains.com/issue/KT-27170
configurations {
    compileClasspath
}