Fix tests

This commit is contained in:
Him188 2020-05-14 16:05:42 +08:00
parent 3eb5a0a4cf
commit 89ac4e863c
2 changed files with 11 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import upload.Bintray
import java.util.*
plugins {
kotlin("jvm")
id("kotlin")
kotlin("plugin.serialization")
id("java")
`maven-publish`
@ -27,9 +27,10 @@ kotlin {
}
}
}
dependencies {
compileOnly("net.mamoe:mirai-core:${Versions.Mirai.core}")
compileOnly(kotlin("stdlib")) // embedded by core
compileAndRuntime("net.mamoe:mirai-core:${Versions.Mirai.core}")
compileAndRuntime(kotlin("stdlib"))
api("com.google.code.gson:gson:2.8.6")
api(group = "org.yaml", name = "snakeyaml", version = "1.25")

View File

@ -1,3 +1,4 @@
import org.gradle.api.artifacts.dsl.DependencyHandler
import org.gradle.kotlin.dsl.DependencyHandlerScope
/*
@ -31,3 +32,9 @@ fun DependencyHandlerScope.kotlinx(id: String, version: String) = "org.jetbrains
@Suppress("unused")
fun DependencyHandlerScope.ktor(id: String, version: String = Versions.Kotlin.ktor) = "io.ktor:ktor-$id:$version"
@Suppress("unused")
fun DependencyHandler.compileAndRuntime(any: Any) {
add("compileOnly", any)
add("runtimeOnly", any)
}