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:
parent
c7c83bcd03
commit
bdfbe43271
mirai-core
@ -34,6 +34,8 @@ afterEvaluate {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
explicitApi()
|
||||
|
||||
if (isAndroidSDKAvailable) {
|
||||
apply(from = rootProject.file("gradle/android.gradle"))
|
||||
android("android") {
|
||||
|
@ -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] 实例
|
||||
|
@ -102,6 +102,7 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override val BotFactory: BotFactory
|
||||
get() = BotFactoryImpl
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user