| /* |
| * Copyright 2018 JetBrains s.r.o. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| buildscript { |
| ext.serializationRepo = "https://dl.bintray.com/kotlin/kotlinx/" |
| |
| repositories { |
| jcenter() |
| maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" } |
| maven { url "https://dl.bintray.com/kotlin/kotlin-dev/" } |
| } |
| |
| dependencies { |
| classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:1.3.20-eap-100" |
| } |
| } |
| |
| repositories { |
| maven { |
| url serializationRepo |
| credentials { |
| username = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') ?: "" |
| password = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') ?: "" |
| } |
| } |
| maven { url "https://dl.bintray.com/kotlin/kotlin-dev/" } |
| } |
| |
| apply plugin: 'kotlin-platform-native' |
| apply plugin: 'kotlinx-serialization-native' |
| |
| sourceSets.main { |
| kotlin.srcDir 'src' |
| component { |
| outputKinds = [EXECUTABLE] |
| target 'host' |
| } |
| } |
| |
| dependencies { |
| implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:0.10.0" |
| } |
| |
| task run(type: Exec, dependsOn: "build") { |
| commandLine 'build/exe/main/debug/example-native.kexe' |
| } |