2020-11-01 15:07:32 +08:00
|
|
|
/*
|
2021-01-01 17:26:55 +08:00
|
|
|
* Copyright 2019-2021 Mamoe Technologies and contributors.
|
2020-11-01 15:07:32 +08:00
|
|
|
*
|
|
|
|
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
|
|
|
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
|
|
|
*
|
|
|
|
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
|
|
|
*/
|
|
|
|
|
2020-10-03 13:35:05 +08:00
|
|
|
@file:Suppress("ObjectPropertyName", "ObjectPropertyName", "unused")
|
2020-11-22 14:25:49 +08:00
|
|
|
|
|
|
|
import org.gradle.api.attributes.Attribute
|
|
|
|
|
2020-03-24 10:01:03 +08:00
|
|
|
object Versions {
|
2021-01-27 14:02:01 +08:00
|
|
|
const val project = "2.2.0-dev-4"
|
2021-01-28 09:32:23 +08:00
|
|
|
const val core = project
|
|
|
|
const val console = project
|
|
|
|
const val consoleTerminal = project
|
2020-10-03 13:35:05 +08:00
|
|
|
|
2020-12-10 14:26:40 +08:00
|
|
|
const val kotlinCompiler = "1.4.21"
|
|
|
|
const val kotlinStdlib = "1.4.21"
|
2021-01-12 18:57:42 +08:00
|
|
|
const val dokka = "1.4.20"
|
|
|
|
|
2020-11-22 14:25:49 +08:00
|
|
|
const val coroutines = "1.4.1"
|
2020-10-03 13:35:05 +08:00
|
|
|
const val atomicFU = "0.14.4"
|
2020-11-22 11:56:54 +08:00
|
|
|
const val serialization = "1.0.1"
|
2020-12-28 15:04:19 +08:00
|
|
|
const val ktor = "1.5.0"
|
2020-10-03 13:35:05 +08:00
|
|
|
|
2021-01-21 14:16:03 +08:00
|
|
|
const val binaryValidator = "0.3.0"
|
2020-10-03 13:35:05 +08:00
|
|
|
|
|
|
|
const val io = "0.1.16"
|
|
|
|
const val coroutinesIo = "0.1.16"
|
|
|
|
|
2021-01-23 15:22:37 +08:00
|
|
|
const val blockingBridge = "1.7.4"
|
2020-10-03 13:35:05 +08:00
|
|
|
|
|
|
|
const val androidGradlePlugin = "3.5.3"
|
|
|
|
|
|
|
|
const val bintray = "1.8.5"
|
2021-01-21 10:08:21 +08:00
|
|
|
const val shadow = "6.1.0"
|
2020-10-03 13:35:05 +08:00
|
|
|
|
|
|
|
const val slf4j = "1.7.30"
|
|
|
|
const val log4j = "2.13.3"
|
2021-01-28 09:32:23 +08:00
|
|
|
|
|
|
|
const val yamlkt = "0.7.5"
|
|
|
|
const val intellijGradlePlugin = "0.4.16"
|
|
|
|
const val kotlinIntellijPlugin = "203-1.4.21-release-IJ5981.133" // keep to newest as kotlinCompiler
|
|
|
|
const val intellij = "2020.3" // don't update easily unless you want your disk space -= 500MB
|
|
|
|
|
2020-03-24 10:01:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@Suppress("unused")
|
2020-03-24 18:11:14 +08:00
|
|
|
fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$version"
|
2020-03-24 10:01:03 +08:00
|
|
|
|
|
|
|
@Suppress("unused")
|
2020-10-03 13:35:05 +08:00
|
|
|
fun ktor(id: String, version: String = Versions.ktor) = "io.ktor:ktor-$id:$version"
|
|
|
|
|
|
|
|
|
|
|
|
val `kotlinx-coroutines-core` = kotlinx("coroutines-core", Versions.coroutines)
|
2021-01-11 18:36:04 +08:00
|
|
|
val `kotlinx-coroutines-jdk8` = kotlinx("coroutines-jdk8", Versions.coroutines)
|
2020-10-03 13:35:05 +08:00
|
|
|
val `kotlinx-serialization-core` = kotlinx("serialization-core", Versions.serialization)
|
|
|
|
val `kotlinx-serialization-json` = kotlinx("serialization-json", Versions.serialization)
|
|
|
|
val `kotlinx-serialization-protobuf` = kotlinx("serialization-protobuf", Versions.serialization)
|
|
|
|
const val `kotlinx-atomicfu` = "org.jetbrains.kotlinx:atomicfu:${Versions.atomicFU}"
|
|
|
|
val `kotlinx-io` = kotlinx("io", Versions.io)
|
|
|
|
val `kotlinx-io-jvm` = kotlinx("io-jvm", Versions.io)
|
|
|
|
val `kotlinx-coroutines-io` = kotlinx("coroutines-io", Versions.coroutinesIo)
|
|
|
|
val `kotlinx-coroutines-io-jvm` = kotlinx("coroutines-io-jvm", Versions.coroutinesIo)
|
|
|
|
|
|
|
|
val `ktor-serialization` = ktor("serialization", Versions.ktor)
|
|
|
|
|
|
|
|
val `ktor-client-core` = ktor("client-core", Versions.ktor)
|
|
|
|
val `ktor-client-cio` = ktor("client-cio", Versions.ktor)
|
2020-12-28 15:04:19 +08:00
|
|
|
val `ktor-client-okhttp` = ktor("client-okhttp", Versions.ktor)
|
2020-10-03 13:35:05 +08:00
|
|
|
val `ktor-client-android` = ktor("client-android", Versions.ktor)
|
|
|
|
val `ktor-network` = ktor("network", Versions.ktor)
|
|
|
|
val `ktor-client-serialization-jvm` = ktor("client-serialization-jvm", Versions.ktor)
|
|
|
|
|
|
|
|
const val slf4j = "org.slf4j:slf4j-api:" + Versions.slf4j
|
2020-11-22 14:25:49 +08:00
|
|
|
const val `log4j-api` = "org.apache.logging.log4j:log4j-api:" + Versions.log4j
|
|
|
|
|
2021-01-28 09:32:23 +08:00
|
|
|
val ATTRIBUTE_MIRAI_TARGET_PLATFORM: Attribute<String> = Attribute.of("mirai.target.platform", String::class.java)
|
|
|
|
|
|
|
|
|
|
|
|
const val `kotlin-compiler` = "org.jetbrains.kotlin:kotlin-compiler:${Versions.kotlinCompiler}"
|
|
|
|
|
|
|
|
const val `kotlin-stdlib` = "org.jetbrains.kotlin:kotlin-stdlib:${Versions.kotlinStdlib}"
|
|
|
|
const val `kotlin-stdlib-jdk8` = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlinStdlib}"
|
|
|
|
const val `kotlin-reflect` = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlinStdlib}"
|
|
|
|
const val `kotlin-test` = "org.jetbrains.kotlin:kotlin-test:${Versions.kotlinStdlib}"
|
|
|
|
const val `kotlin-test-junit5` = "org.jetbrains.kotlin:kotlin-test-junit5:${Versions.kotlinStdlib}"
|
|
|
|
|
|
|
|
|
|
|
|
const val `mirai-core-api` = "net.mamoe:mirai-core-api:${Versions.core}"
|
|
|
|
const val `mirai-core` = "net.mamoe:mirai-core:${Versions.core}"
|
|
|
|
const val `mirai-core-utils` = "net.mamoe:mirai-core-utils:${Versions.core}"
|
|
|
|
|
|
|
|
const val yamlkt = "net.mamoe.yamlkt:yamlkt:${Versions.yamlkt}"
|
|
|
|
|
|
|
|
const val `jetbrains-annotations` = "org.jetbrains:annotations:19.0.0"
|
|
|
|
|
|
|
|
|
|
|
|
const val `caller-finder` = "io.github.karlatemp:caller:1.0.1"
|