mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Import yamlkt using 'implementation', improve buildscript
This commit is contained in:
parent
e10a17ccd4
commit
71a02e7630
@ -65,10 +65,9 @@ dependencies {
|
||||
compileAndTestRuntime(kotlinx("serialization-core", Versions.serialization))
|
||||
compileAndTestRuntime(kotlin("reflect"))
|
||||
|
||||
implementation("org.jetbrains:annotations:19.0.0")
|
||||
|
||||
smartImplementation("net.mamoe.yamlkt:yamlkt:${Versions.yamlkt}")
|
||||
smartImplementation("org.jetbrains:annotations:19.0.0")
|
||||
smartApi(kotlinx("coroutines-jdk8", Versions.coroutines))
|
||||
smartApi("net.mamoe.yamlkt:yamlkt:${Versions.yamlkt}")
|
||||
|
||||
testApi("net.mamoe:mirai-core-qqandroid:${Versions.core}")
|
||||
testApi(kotlin("stdlib-jdk8"))
|
||||
|
@ -26,9 +26,22 @@ fun DependencyHandler.compileAndTestRuntime(any: Any) {
|
||||
|
||||
fun DependencyHandler.smartApi(
|
||||
dependencyNotation: String
|
||||
): ExternalModuleDependency {
|
||||
return smart("api", dependencyNotation)
|
||||
}
|
||||
|
||||
fun DependencyHandler.smartImplementation(
|
||||
dependencyNotation: String
|
||||
): ExternalModuleDependency {
|
||||
return smart("implementation", dependencyNotation)
|
||||
}
|
||||
|
||||
private fun DependencyHandler.smart(
|
||||
configuration: String,
|
||||
dependencyNotation: String
|
||||
): ExternalModuleDependency {
|
||||
return addDependencyTo(
|
||||
this, "api", dependencyNotation
|
||||
this, configuration, dependencyNotation
|
||||
) {
|
||||
fun exclude(group: String, module: String) {
|
||||
exclude(mapOf(
|
||||
|
Loading…
Reference in New Issue
Block a user