Created
February 16, 2018 05:59
-
-
Save es0329/bc79467031e923f321e1fe1ce3e98a56 to your computer and use it in GitHub Desktop.
Gradle for Kotlin/Native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// plugin requirements | |
buildscript { | |
repositories { | |
mavenCentral() | |
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" } | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.6" | |
} | |
} | |
apply plugin: 'konan' | |
// targets | |
konan.targets = ['macbook'] | |
// output | |
konanArtifacts { | |
// include with build | |
library('utils') { | |
srcFiles fileTree('src/libs/utils') | |
} | |
// specify filename | |
program('hello') { | |
// reference dependencies | |
libraries { | |
artifact 'utils' | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eric @ /Users/eric/Documents/development/kotlin/gradle_for_native_kotlin | |
~~ gradle build | |
> Task :compileKonanUtilsMacbook FAILED | |
error: you have not specified any compilation arguments. No output has been produced. | |
FAILURE: Build failed with an exception. | |
* What went wrong: | |
Execution failed for task ':compileKonanUtilsMacbook'. | |
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 | |
* 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 | |
BUILD FAILED in 2s | |
2 actionable tasks: 2 executed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment