I'm trying to build a native in Windows.
I'm not sure where to put the dependency for implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5'.
My current gradle file looks like this:
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '1.3.72'
}
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5'
}
repositories {
mavenCentral()
jcenter()
}
kotlin {
mingwX64("mingw") {
binaries {
executable {
// Change to specify fully qualified name of your application's entry point:
entryPoint = 'sample.main'
// Specify command-line arguments, if necessary:
runTask?.args('')
}
}
}
sourceSets {
mingwMain {
}
mingwTest {
}
}
experimental {
coroutines 'enable'
}
}
This dependency line gives error:
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5'
}
The error is:
Could not find method implementation() for arguments [org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
If I remove that dependency, I get "unresolved Reference" if I try to import kotlinx.coroutines.* and kotlin.concurrent.thread
Appreciate some help on this.
Thanks