mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-29 18:10:13 +08:00
Fix build
This commit is contained in:
parent
80722aaea7
commit
0d96ea53d0
@ -231,7 +231,8 @@ val experimentalAnnotations = arrayOf(
|
||||
"kotlin.experimental.ExperimentalTypeInference",
|
||||
"net.mamoe.mirai.utils.MiraiInternalAPI",
|
||||
"net.mamoe.mirai.utils.MiraiExperimentalAPI",
|
||||
"net.mamoe.mirai.LowLevelAPI"
|
||||
"net.mamoe.mirai.LowLevelAPI",
|
||||
"kotlinx.serialization.ExperimentalSerializationApi"
|
||||
)
|
||||
|
||||
fun Project.configureKotlinExperimentalUsages() {
|
||||
|
@ -13,6 +13,7 @@ package net.mamoe.mirai.contact
|
||||
|
||||
import net.mamoe.mirai.message.data.Message
|
||||
import net.mamoe.mirai.utils.asHumanReadable
|
||||
import kotlin.time.ExperimentalTime
|
||||
import kotlin.time.seconds
|
||||
|
||||
/**
|
||||
@ -38,6 +39,7 @@ public class MessageTooLargeException(
|
||||
*
|
||||
* @see Group.sendMessage
|
||||
*/
|
||||
@OptIn(ExperimentalTime::class)
|
||||
public class BotIsBeingMutedException(
|
||||
public val target: Group
|
||||
) : RuntimeException("bot is being muted, remaining ${target.botMuteRemaining.seconds.asHumanReadable} seconds")
|
||||
|
@ -209,6 +209,7 @@ internal inline fun <T : CustomMessageMetadata> T.customToStringImpl(factory: Cu
|
||||
return (factory as CustomMessage.Factory<T>).dump(this)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@JvmOverloads
|
||||
@Suppress("DuplicatedCode") // false positive. foreach is not common to UByteArray and ByteArray
|
||||
internal fun ByteArray.toUHexString(
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
package net.mamoe.mirai.event;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
|
@ -11,7 +11,7 @@ package net.mamoe.mirai.event
|
||||
import kotlinx.coroutines.*
|
||||
import net.mamoe.mirai.event.broadcast
|
||||
import net.mamoe.mirai.event.subscribeAlways
|
||||
import org.junit.Test
|
||||
import org.junit.jupiter.api.Test
|
||||
import kotlin.test.assertFalse
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import net.mamoe.mirai.event.*
|
||||
import org.jetbrains.annotations.NotNull
|
||||
import org.junit.Test
|
||||
import org.junit.jupiter.api.Test
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import kotlin.coroutines.EmptyCoroutineContext
|
||||
import kotlin.test.assertEquals
|
||||
|
@ -145,6 +145,7 @@ internal class LockFreeLinkedListTest {
|
||||
list.size shouldBeEqualTo 0
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
@Test
|
||||
fun withInlineClassElements() {
|
||||
val list = LockFreeLinkedList<UInt>()
|
||||
|
@ -1,9 +1,12 @@
|
||||
/*
|
||||
* Copyright 2020 Mamoe Technologies and contributors.
|
||||
* 此源代码的使用受 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
|
||||
* * Copyright 2020 Mamoe Technologies and contributors.
|
||||
* *
|
||||
* * 此源代码的使用受 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
|
||||
*
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.javatest;
|
||||
@ -12,7 +15,7 @@ import kotlin.coroutines.EmptyCoroutineContext;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.CoroutineScopeKt;
|
||||
import net.mamoe.mirai.event.*;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
Loading…
Reference in New Issue
Block a user