1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-25 04:50:26 +08:00

Enable explicitApi for mirai-core, add notes for BotFactoryImpl

This commit is contained in:
Him188 2021-01-22 11:19:11 +08:00
parent c7c83bcd03
commit bdfbe43271
3 changed files with 9 additions and 2 deletions
mirai-core

View File

@ -34,6 +34,8 @@ afterEvaluate {
}
kotlin {
explicitApi()
if (isAndroidSDKAvailable) {
apply(from = rootProject.file("gradle/android.gradle"))
android("android") {

View File

@ -20,8 +20,12 @@ import net.mamoe.mirai.utils.BotConfiguration
/**
* QQ for Android
*/
@Suppress("INAPPLICABLE_JVM_NAME")
object BotFactoryImpl : BotFactory {
@Deprecated(
"BotFactoryImpl was accidentally made public, use BotFactory.INSTANCE instead",
ReplaceWith("BotFactory", "net.mamoe.mirai.BotFactory"),
DeprecationLevel.WARNING,
)
public object BotFactoryImpl : BotFactory {
/**
* 使用指定的 [配置][configuration] 构造 [Bot] 实例

View File

@ -102,6 +102,7 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
}
}
@Suppress("DEPRECATION")
override val BotFactory: BotFactory
get() = BotFactoryImpl