Make mirai-console-compiler-annotations multiplatform

This commit is contained in:
Him188 2021-12-23 00:12:06 +00:00
parent 8a2b75ae29
commit 63957b183b
4 changed files with 17 additions and 4 deletions

View File

@ -9,9 +9,10 @@
@file:Suppress("UnusedImport")
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
plugins {
kotlin("jvm")
id("java")
kotlin("multiplatform")
`maven-publish`
}
@ -20,6 +21,16 @@ description = "Mirai Console compiler annotations"
kotlin {
explicitApi()
jvm("android") {
attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.androidJvm)
}
jvm("common") {
attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.common)
}
jvm("jvm")
}
configurePublishing("mirai-console-compiler-annotations")
configureMppPublishing()

View File

@ -82,7 +82,9 @@ public annotation class ResolveContext(
*/
RESTRICTED_NO_ARG_CONSTRUCTOR, // NOT_CONSTRUCTABLE_TYPE
RESTRICTED_CONSOLE_COMMAND_OWNER, ;
RESTRICTED_CONSOLE_COMMAND_OWNER,
RESTRICTED_ABSTRACT_MESSAGE_KEYS;
public companion object
}