From 95688e37af093a2d0b00b5817f3572932825b6a0 Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 24 Feb 2021 12:15:19 +0800 Subject: [PATCH] Update to Kotlin 1.4.30 and bump other dependencies versions (#1049) - kotlin-stdlib and compiler 1.4.30 - kotlinx-serialization 1.1.0-RC - kotlinx-coroutines 1.4.2 - ktor 1.5.1 - atomicfu 0.15.1 - yamlkt 0.9.0 - kotlin-jvm-blocking-bridge 1.10.0 - intellij 2020.3.2 - kotlin-intellij 203-1.4.30-release-IJ7148.5 - Gradle 6.8.2 --- .../api/binary-compatibility-validator.api | 58 ++++++---- buildSrc/src/main/kotlin/Versions.kt | 18 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- .../commonMain/kotlin/contact/NormalMember.kt | 7 ++ .../src/commonMain/kotlin/event/select.kt | 101 ++++++++++++++++++ 5 files changed, 155 insertions(+), 31 deletions(-) diff --git a/binary-compatibility-validator/api/binary-compatibility-validator.api b/binary-compatibility-validator/api/binary-compatibility-validator.api index b4fa01302..63e9b8d47 100644 --- a/binary-compatibility-validator/api/binary-compatibility-validator.api +++ b/binary-compatibility-validator/api/binary-compatibility-validator.api @@ -482,7 +482,8 @@ public abstract interface class net/mamoe/mirai/contact/NormalMember : net/mamoe public final class net/mamoe/mirai/contact/NormalMemberKt { public static final fun getNameCardOrNick (Lnet/mamoe/mirai/contact/User;)Ljava/lang/String; public static final fun isMuted (Lnet/mamoe/mirai/contact/NormalMember;)Z - public static final fun mute-fcu0wV4 (Lnet/mamoe/mirai/contact/NormalMember;DLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun mute-8Mi8wO0 (Lnet/mamoe/mirai/contact/NormalMember;DLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final synthetic fun mute-fcu0wV4 (Lnet/mamoe/mirai/contact/NormalMember;DLkotlin/coroutines/Continuation;)Ljava/lang/Object; } public abstract interface class net/mamoe/mirai/contact/OtherClient : net/mamoe/mirai/contact/Contact { @@ -1630,12 +1631,12 @@ public abstract class net/mamoe/mirai/event/MessageSelectBuilder : net/mamoe/mir public synthetic fun quoteReply (Lnet/mamoe/mirai/event/MessageSubscribersBuilder$ListeningFilter;Lkotlin/jvm/functions/Function3;)Ljava/lang/Void; public synthetic fun quoteReply (Lnet/mamoe/mirai/event/MessageSubscribersBuilder$ListeningFilter;Lnet/mamoe/mirai/message/data/Message;)Ljava/lang/Object; public synthetic fun quoteReply (Lnet/mamoe/mirai/event/MessageSubscribersBuilder$ListeningFilter;Lnet/mamoe/mirai/message/data/Message;)Ljava/lang/Void; - public synthetic fun quoteReply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)Ljava/lang/Void; - public synthetic fun quoteReply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)V - public synthetic fun quoteReply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)Ljava/lang/Void; - public synthetic fun quoteReply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)V - public synthetic fun quoteReply-sCZ5gAI (JLjava/lang/String;)Ljava/lang/Void; - public synthetic fun quoteReply-sCZ5gAI (JLjava/lang/String;)V + public synthetic fun quoteReply-8NSq9Eo (JLjava/lang/String;)Ljava/lang/Void; + public synthetic fun quoteReply-8NSq9Eo (JLjava/lang/String;)V + public synthetic fun quoteReply-8NSq9Eo (JLkotlin/jvm/functions/Function1;)Ljava/lang/Void; + public synthetic fun quoteReply-8NSq9Eo (JLkotlin/jvm/functions/Function1;)V + public synthetic fun quoteReply-8NSq9Eo (JLnet/mamoe/mirai/message/data/Message;)Ljava/lang/Void; + public synthetic fun quoteReply-8NSq9Eo (JLnet/mamoe/mirai/message/data/Message;)V public synthetic fun reply (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; public synthetic fun reply (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; public synthetic fun reply (Ljava/lang/String;Lkotlin/jvm/functions/Function3;)Ljava/lang/Object; @@ -1648,12 +1649,12 @@ public abstract class net/mamoe/mirai/event/MessageSelectBuilder : net/mamoe/mir public synthetic fun reply (Lnet/mamoe/mirai/event/MessageSubscribersBuilder$ListeningFilter;Lkotlin/jvm/functions/Function3;)Ljava/lang/Void; public synthetic fun reply (Lnet/mamoe/mirai/event/MessageSubscribersBuilder$ListeningFilter;Lnet/mamoe/mirai/message/data/Message;)Ljava/lang/Object; public synthetic fun reply (Lnet/mamoe/mirai/event/MessageSubscribersBuilder$ListeningFilter;Lnet/mamoe/mirai/message/data/Message;)Ljava/lang/Void; - public synthetic fun reply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)Ljava/lang/Void; - public synthetic fun reply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)V - public synthetic fun reply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)Ljava/lang/Void; - public synthetic fun reply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)V - public synthetic fun reply-sCZ5gAI (JLjava/lang/String;)Ljava/lang/Void; - public synthetic fun reply-sCZ5gAI (JLjava/lang/String;)V + public synthetic fun reply-8NSq9Eo (JLjava/lang/String;)Ljava/lang/Void; + public synthetic fun reply-8NSq9Eo (JLjava/lang/String;)V + public synthetic fun reply-8NSq9Eo (JLkotlin/jvm/functions/Function1;)Ljava/lang/Void; + public synthetic fun reply-8NSq9Eo (JLkotlin/jvm/functions/Function1;)V + public synthetic fun reply-8NSq9Eo (JLnet/mamoe/mirai/message/data/Message;)Ljava/lang/Void; + public synthetic fun reply-8NSq9Eo (JLnet/mamoe/mirai/message/data/Message;)V } public abstract class net/mamoe/mirai/event/MessageSelectBuilderUnit : net/mamoe/mirai/event/MessageSubscribersBuilder { @@ -1663,17 +1664,32 @@ public abstract class net/mamoe/mirai/event/MessageSelectBuilderUnit : net/mamoe public abstract fun default (Lkotlin/jvm/functions/Function3;)V public final fun defaultQuoteReply (Lkotlin/jvm/functions/Function1;)V public final fun defaultReply (Lkotlin/jvm/functions/Function1;)V - public final fun invoke-RNyhSv4 (JLkotlin/jvm/functions/Function1;)V + public final fun invoke-8NSq9Eo (JLkotlin/jvm/functions/Function1;)V + public final synthetic fun invoke-RNyhSv4 (JLkotlin/jvm/functions/Function1;)Ljava/lang/Void; + public final synthetic fun invoke-RNyhSv4 (JLkotlin/jvm/functions/Function1;)V protected abstract fun obtainCurrentCoroutineScope ()Lkotlinx/coroutines/CoroutineScope; protected abstract fun obtainCurrentDeferred ()Lkotlinx/coroutines/CompletableDeferred; - public fun quoteReply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)V - public fun quoteReply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)V - public fun quoteReply-sCZ5gAI (JLjava/lang/String;)V - public fun reply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)V - public fun reply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)V - public fun reply-sCZ5gAI (JLjava/lang/String;)V + public fun quoteReply-8NSq9Eo (JLjava/lang/String;)V + public fun quoteReply-8NSq9Eo (JLkotlin/jvm/functions/Function1;)V + public fun quoteReply-8NSq9Eo (JLnet/mamoe/mirai/message/data/Message;)V + public final synthetic fun quoteReply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)Ljava/lang/Void; + public final synthetic fun quoteReply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)V + public final synthetic fun quoteReply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)Ljava/lang/Void; + public final synthetic fun quoteReply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)V + public final synthetic fun quoteReply-sCZ5gAI (JLjava/lang/String;)Ljava/lang/Void; + public final synthetic fun quoteReply-sCZ5gAI (JLjava/lang/String;)V + public fun reply-8NSq9Eo (JLjava/lang/String;)V + public fun reply-8NSq9Eo (JLkotlin/jvm/functions/Function1;)V + public fun reply-8NSq9Eo (JLnet/mamoe/mirai/message/data/Message;)V + public final synthetic fun reply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)Ljava/lang/Void; + public final synthetic fun reply-AVDwu3U (JLnet/mamoe/mirai/message/data/Message;)V + public final synthetic fun reply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)Ljava/lang/Void; + public final synthetic fun reply-RNyhSv4 (JLkotlin/jvm/functions/Function1;)V + public final synthetic fun reply-sCZ5gAI (JLjava/lang/String;)Ljava/lang/Void; + public final synthetic fun reply-sCZ5gAI (JLjava/lang/String;)V public final fun timeout (JLkotlin/jvm/functions/Function1;)V - public final fun timeout-ncvN2qU (J)J + public final fun timeout-1WcQj8o (J)J + public final synthetic fun timeout-ncvN2qU (J)J public final fun timeoutException (JLkotlin/jvm/functions/Function0;)V public static synthetic fun timeoutException$default (Lnet/mamoe/mirai/event/MessageSelectBuilderUnit;JLkotlin/jvm/functions/Function0;ILjava/lang/Object;)V } diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index a9882c7de..cfa051c01 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -18,16 +18,16 @@ object Versions { const val console = project const val consoleTerminal = project - const val kotlinCompiler = "1.4.21" - const val kotlinStdlib = "1.4.21" + const val kotlinCompiler = "1.4.30" + const val kotlinStdlib = "1.4.30" const val dokka = "1.4.20" - const val coroutines = "1.4.1" - const val atomicFU = "0.14.4" - const val serialization = "1.0.1" - const val ktor = "1.5.0" + const val coroutines = "1.4.2" + const val atomicFU = "0.15.1" + const val serialization = "1.1.0-RC" + const val ktor = "1.5.1" - const val binaryValidator = "0.3.0" + const val binaryValidator = "0.4.0" const val io = "0.1.16" const val coroutinesIo = "0.1.16" @@ -47,8 +47,8 @@ object Versions { 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 + const val kotlinIntellijPlugin = "203-1.4.30-release-IJ7148.5" // keep to newest as kotlinCompiler + const val intellij = "2020.3.2" // don't update easily unless you want your disk space -= 500MB } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1c728b8a2..399cacd3a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -6,7 +6,7 @@ # # https://github.com/mamoe/mirai/blob/master/LICENSE # -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt b/mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt index 9eab60588..2fff634a3 100644 --- a/mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt +++ b/mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt @@ -167,3 +167,10 @@ public suspend inline fun NormalMember.mute(duration: Duration) { require(duration.inSeconds > 0) { "duration must be greater than 0 second" } this.mute(duration.inSeconds.toInt()) } + +@Suppress("unused") +@JvmName("mute-fcu0wV4") +@Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) +public suspend inline fun NormalMember.mute00(duration: Duration) { + return mute(duration) +} diff --git a/mirai-core-api/src/commonMain/kotlin/event/select.kt b/mirai-core-api/src/commonMain/kotlin/event/select.kt index 3c447ca83..457b2dabd 100644 --- a/mirai-core-api/src/commonMain/kotlin/event/select.kt +++ b/mirai-core-api/src/commonMain/kotlin/event/select.kt @@ -387,6 +387,107 @@ public abstract class MessageSelectBuilderUnit @PublishedAp } } + + @JvmName("timeout-ncvN2qU") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public fun timeout00(timeoutMillis: Long): MessageSelectionTimeoutChecker { + return timeout(timeoutMillis) + } + + @Suppress("unused") + @JvmName("invoke-RNyhSv4") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public fun MessageSelectionTimeoutChecker.invoke00(block: suspend () -> R) { + return invoke(block) + } + + @Suppress("unused") + @JvmName("invoke-RNyhSv4") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public fun MessageSelectionTimeoutChecker.invoke000(block: suspend () -> R): Void? { + invoke(block) + return null + } + + @JvmName("reply-RNyhSv4") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.reply00(block: suspend () -> Any?) { + return reply(block) + } + + @JvmName("reply-RNyhSv4") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.reply000(block: suspend () -> Any?): Void? { + reply(block) + return null + } + + @JvmName("reply-sCZ5gAI") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.reply00(message: String) { + return reply(message) + } + + @JvmName("reply-sCZ5gAI") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.reply000(message: String): Void? { + reply(message) + return null + } + + @JvmName("reply-AVDwu3U") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.reply00(message: Message) { + return reply(message) + } + + @JvmName("reply-AVDwu3U") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.reply000(message: Message): Void? { + reply(message) + return null + } + + + @JvmName("quoteReply-RNyhSv4") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.quoteReply00(block: suspend () -> Any?) { + return reply(block) + } + + @JvmName("quoteReply-RNyhSv4") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.quoteReply000(block: suspend () -> Any?): Void? { + reply(block) + return null + } + + @JvmName("quoteReply-sCZ5gAI") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.quoteReply00(message: String) { + return reply(message) + } + + @JvmName("quoteReply-sCZ5gAI") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.quoteReply000(message: String): Void? { + reply(message) + return null + } + + @JvmName("quoteReply-AVDwu3U") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.quoteReply00(message: Message) { + return reply(message) + } + + @JvmName("quoteReply-AVDwu3U") + @Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN) + public infix fun MessageSelectionTimeoutChecker.quoteReply000(message: Message): Void? { + reply(message) + return null + } + protected abstract fun obtainCurrentCoroutineScope(): CoroutineScope protected abstract fun obtainCurrentDeferred(): CompletableDeferred? }