Skip to content

Instantly share code, notes, and snippets.

@jnorthrup
Created June 7, 2019 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnorthrup/bb603d844ddfd9f4fa2b3509d3ccafe3 to your computer and use it in GitHub Desktop.
Save jnorthrup/bb603d844ddfd9f4fa2b3509d3ccafe3 to your computer and use it in GitHub Desktop.
plugins {
id 'kotlin-multiplatform' version '1.3.31'
}
repositories {
jcenter()
mavenCentral()
}
group 'com.example'
version '0.0.1'
apply plugin: 'maven-publish'
kotlin {
jvm()
js()
// For ARM, should be changed to iosArm32 or iosArm64
// For Linux, should be changed to e.g. linuxX64
// For MacOS, should be changed to e.g. macosX64
// For Windows, should be changed to e.g. mingwX64
linuxX64("linux")
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib-common')
implementation 'org.jetbrains.kotlinx:kotlinx-io:0.1.9'
}
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
}
}
jvmMain {
dependencies {
implementation kotlin('stdlib-jdk8')
compile 'org.jetbrains.kotlinx:kotlinx-io-jvm:0.1.9'
}
}
jvmTest {
dependencies {
implementation kotlin('test')
implementation kotlin('test-junit')
}
}
jsMain {
dependencies {
implementation kotlin('stdlib-js')
}
}
jsTest {
dependencies {
implementation kotlin('test-js')
}
}
linuxMain {
}
linuxTest {
}
}
}
@jnorthrup
Copy link
Author

02:14:58: Executing task 'init'...

Configure project :
Kotlin Multiplatform Projects are an experimental feature.
This build is set up to publish Kotlin multiplatform libraries with experimental Gradle metadata. Future Gradle versions may fail to resolve dependencies on these publications. You can disable Gradle metadata usage during publishing and dependencies resolution by removing enableFeaturePreview('GRADLE_METADATA') from the settings.gradle file.

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/jim/work/modellika/build.gradle' line: 39

  • What went wrong:
    A problem occurred evaluating root project 'modellika'.

Could not find method compile() for arguments [org.jetbrains.kotlinx:kotlinx-io-jvm:0.1.9] on object of type org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 0s
Could not find method compile() for arguments [org.jetbrains.kotlinx:kotlinx-io-jvm:0.1.9] on object of type org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler.
02:14:58: Task execution finished 'init'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment