Fix build

This commit is contained in:
Him188 2020-10-03 13:44:19 +08:00
parent 80722aaea7
commit 0d96ea53d0
8 changed files with 17 additions and 9 deletions

View File

@ -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() {

View File

@ -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")

View File

@ -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(

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -145,6 +145,7 @@ internal class LockFreeLinkedListTest {
list.size shouldBeEqualTo 0
}
@OptIn(ExperimentalUnsignedTypes::class)
@Test
fun withInlineClassElements() {
val list = LockFreeLinkedList<UInt>()

View File

@ -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;