Fix build

This commit is contained in:
Him188 2020-04-10 13:42:04 +08:00
parent c27ee12bdb
commit 7357169560
8 changed files with 14 additions and 4 deletions

View File

@ -18,6 +18,7 @@ import net.mamoe.mirai.event.events.*
import net.mamoe.mirai.event.events.MessageSendEvent.FriendMessageSendEvent import net.mamoe.mirai.event.events.MessageSendEvent.FriendMessageSendEvent
import net.mamoe.mirai.event.events.MessageSendEvent.GroupMessageSendEvent import net.mamoe.mirai.event.events.MessageSendEvent.GroupMessageSendEvent
import net.mamoe.mirai.future import net.mamoe.mirai.future
import net.mamoe.mirai.message.MessageReceipt
import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.message.data.Image
import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.message.data.Message
import net.mamoe.mirai.message.uploadImage import net.mamoe.mirai.message.uploadImage
@ -61,14 +62,14 @@ actual abstract class ContactJavaFriendlyAPI {
*/ */
@Throws(EventCancelledException::class, IllegalStateException::class) @Throws(EventCancelledException::class, IllegalStateException::class)
@JvmName("sendMessage") @JvmName("sendMessage")
open fun __sendMessageBlockingForJava__(message: Message): MessageReceipt<Contact> { open fun __sendMessageBlockingForJava__(message: Message): MessageReceipt<@JvmWildcard Contact> {
return runBlocking { return runBlocking {
sendMessage(message) sendMessage(message)
} }
} }
@JvmName("sendMessage") @JvmName("sendMessage")
open fun __sendMessageBlockingForJava__(message: String): MessageReceipt<Contact> { open fun __sendMessageBlockingForJava__(message: String): MessageReceipt<@JvmWildcard Contact> {
return runBlocking { sendMessage(message) } return runBlocking { sendMessage(message) }
} }
@ -142,7 +143,7 @@ actual abstract class ContactJavaFriendlyAPI {
* @see Contact.sendMessage * @see Contact.sendMessage
*/ */
@JvmName("sendMessageAsync") @JvmName("sendMessageAsync")
open fun __sendMessageAsyncForJava__(message: Message): Future<MessageReceipt<Contact>> { open fun __sendMessageAsyncForJava__(message: Message): Future<MessageReceipt<@JvmWildcard Contact>> {
return future { sendMessage(message) } return future { sendMessage(message) }
} }
@ -151,7 +152,7 @@ actual abstract class ContactJavaFriendlyAPI {
* @see Contact.sendMessage * @see Contact.sendMessage
*/ */
@JvmName("sendMessageAsync") @JvmName("sendMessageAsync")
open fun __sendMessageAsyncForJava__(message: String): Future<MessageReceipt<Contact>> { open fun __sendMessageAsyncForJava__(message: String): Future<MessageReceipt<@JvmWildcard Contact>> {
return future { sendMessage(message) } return future { sendMessage(message) }
} }

View File

@ -16,6 +16,7 @@ import net.mamoe.mirai.data.MemberInfo
import net.mamoe.mirai.event.events.* import net.mamoe.mirai.event.events.*
import net.mamoe.mirai.event.events.MessageSendEvent.FriendMessageSendEvent import net.mamoe.mirai.event.events.MessageSendEvent.FriendMessageSendEvent
import net.mamoe.mirai.event.events.MessageSendEvent.GroupMessageSendEvent import net.mamoe.mirai.event.events.MessageSendEvent.GroupMessageSendEvent
import net.mamoe.mirai.message.MessageReceipt
import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.message.data.Message
import net.mamoe.mirai.message.data.OfflineGroupImage import net.mamoe.mirai.message.data.OfflineGroupImage
import net.mamoe.mirai.utils.ExternalImage import net.mamoe.mirai.utils.ExternalImage

View File

@ -16,6 +16,7 @@ import net.mamoe.mirai.JavaFriendlyAPI
import net.mamoe.mirai.event.events.* import net.mamoe.mirai.event.events.*
import net.mamoe.mirai.event.events.MessageSendEvent.FriendMessageSendEvent import net.mamoe.mirai.event.events.MessageSendEvent.FriendMessageSendEvent
import net.mamoe.mirai.event.events.MessageSendEvent.GroupMessageSendEvent import net.mamoe.mirai.event.events.MessageSendEvent.GroupMessageSendEvent
import net.mamoe.mirai.message.MessageReceipt
import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.message.data.Message
import net.mamoe.mirai.utils.MiraiInternalAPI import net.mamoe.mirai.utils.MiraiInternalAPI
import net.mamoe.mirai.utils.WeakRefProperty import net.mamoe.mirai.utils.WeakRefProperty

View File

@ -12,6 +12,7 @@ import net.mamoe.mirai.event.events.EventCancelledException
import net.mamoe.mirai.event.events.ImageUploadEvent import net.mamoe.mirai.event.events.ImageUploadEvent
import net.mamoe.mirai.event.events.MessageSendEvent.FriendMessageSendEvent import net.mamoe.mirai.event.events.MessageSendEvent.FriendMessageSendEvent
import net.mamoe.mirai.event.events.MessageSendEvent.GroupMessageSendEvent import net.mamoe.mirai.event.events.MessageSendEvent.GroupMessageSendEvent
import net.mamoe.mirai.message.MessageReceipt
import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.message.data.Message
import net.mamoe.mirai.message.data.OfflineFriendImage import net.mamoe.mirai.message.data.OfflineFriendImage
import net.mamoe.mirai.utils.ExternalImage import net.mamoe.mirai.utils.ExternalImage

View File

@ -13,6 +13,7 @@ package net.mamoe.mirai.message
import android.graphics.Bitmap import android.graphics.Bitmap
import kotlinx.io.core.Input import kotlinx.io.core.Input
import net.mamoe.mirai.contact.Contact
import net.mamoe.mirai.contact.QQ import net.mamoe.mirai.contact.QQ
import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.message.data.Image
import net.mamoe.mirai.utils.MiraiInternalAPI import net.mamoe.mirai.utils.MiraiInternalAPI

View File

@ -15,8 +15,10 @@ import android.graphics.Bitmap
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import kotlinx.io.core.Input import kotlinx.io.core.Input
import net.mamoe.mirai.contact.Contact
import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.message.data.Image
import net.mamoe.mirai.utils.OverFileSizeMaxException import net.mamoe.mirai.utils.OverFileSizeMaxException
import net.mamoe.mirai.utils.sendTo
import net.mamoe.mirai.utils.toExternalImage import net.mamoe.mirai.utils.toExternalImage
import net.mamoe.mirai.utils.upload import net.mamoe.mirai.utils.upload
import java.io.File import java.io.File

View File

@ -15,6 +15,7 @@ import kotlinx.coroutines.io.ByteWriteChannel
import kotlinx.io.core.Input import kotlinx.io.core.Input
import kotlinx.io.core.Output import kotlinx.io.core.Output
import kotlinx.io.core.use import kotlinx.io.core.use
import net.mamoe.mirai.contact.Contact
import net.mamoe.mirai.contact.QQ import net.mamoe.mirai.contact.QQ
import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.message.data.Image
import net.mamoe.mirai.utils.MiraiExperimentalAPI import net.mamoe.mirai.utils.MiraiExperimentalAPI

View File

@ -14,9 +14,11 @@ package net.mamoe.mirai.message
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import kotlinx.io.core.Input import kotlinx.io.core.Input
import net.mamoe.mirai.contact.Contact
import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.message.data.Image
import net.mamoe.mirai.message.data.OfflineImage import net.mamoe.mirai.message.data.OfflineImage
import net.mamoe.mirai.utils.OverFileSizeMaxException import net.mamoe.mirai.utils.OverFileSizeMaxException
import net.mamoe.mirai.utils.sendTo
import net.mamoe.mirai.utils.toExternalImage import net.mamoe.mirai.utils.toExternalImage
import net.mamoe.mirai.utils.upload import net.mamoe.mirai.utils.upload
import java.awt.image.BufferedImage import java.awt.image.BufferedImage