mirai/mirai-core/build.gradle
2019-10-24 22:55:33 +08:00

102 lines
4.0 KiB
Groovy

apply plugin: 'kotlinx-atomicfu'
apply plugin: "kotlin-multiplatform"
kotlin {
targets {
fromPreset(presets.jvm, "jvm")
//fromPreset(presets.mingwX64, "mingwX64")
}
jvm{
withJava()
}
/*
mingwX64("mingwX64") {
binaries {
executable {
// Change to specify fully qualified name of your application's entry point:
entryPoint = 'main'
// Specify command-line arguments, if necessary:
runTask?.args('')
}
}
}*/
sourceSets {
commonMain {
dependencies {
api group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-common', version: kotlin_version
api group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
api group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core-common', version: coroutines_version
api group: 'org.jetbrains.kotlinx', name: 'atomicfu-common', version: atomicfu_version
api group: 'org.jetbrains.kotlinx', name: 'kotlinx-io', version: kotlinxio_version
api group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-io', version: coroutinesio_version
implementation "com.soywiz.korlibs.klock:klock:$klock_version"
api group: 'io.ktor', name: 'ktor-client-core', version: ktor_version
//api group: 'io.ktor', name: 'ktor-client-cio', version: ktor_version
//api group: 'io.ktor', name: 'ktor-client', version: ktor_version
api group: 'io.ktor', name: 'ktor-http', version: ktor_version
//api group: 'io.ktor', name: 'ktor-utils', version: ktor_version
//api group: 'io.ktor', name: 'ktor-io', version: ktorio_version
}
}
jvmMain {
apply plugin: 'java'
dependencies {
api group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_version
api group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version
api group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
api group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: coroutines_version
api group: 'org.jetbrains.kotlinx', name: 'atomicfu', version: atomicfu_version
api group: 'org.jetbrains.kotlinx', name: 'kotlinx-io', version: kotlinxio_version
// api group: 'org.jetbrains.kotlinx', name: 'kotlinx-io-jvm', version: kotlinxio_version
api group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-io', version: coroutinesio_version
api group: 'io.ktor', name: 'ktor-http-cio', version: ktor_version
api group: 'io.ktor', name: 'ktor-http', version: ktor_version
api group: 'io.ktor', name: 'ktor-client-core-jvm', version: ktor_version
api group: 'io.ktor', name: 'ktor-client-cio', version: ktor_version
implementation 'org.yaml:snakeyaml:1.18'
implementation 'org.jsoup:jsoup:1.12.1'
implementation 'org.ini4j:ini4j:0.5.2'
}
}
/*
mingwX64Main {
dependencies {
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-reflect
implementation rootProject.ext.kotlinCommon
implementation rootProject.ext.coroutine
implementation rootProject.ext.coroutineNative
implementation rootProject.ext.kotlinNative
implementation rootProject.ext.reflect
//implementation rootProject.ext.coroutine
implementation rootProject.ext.kotlinxIONative
}
}*/
jvmTest {
apply plugin: 'java'
}
all {
languageSettings.enableLanguageFeature("InlineClasses")
}
}
}
compileKotlinJvm {
}
compileTestJava{
}