mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-27 17:00:14 +08:00
Update buildscript
This commit is contained in:
parent
bbda068e78
commit
7bf8775261
@ -238,20 +238,25 @@ val experimentalAnnotations = arrayOf(
|
||||
"kotlin.RequiresOptIn",
|
||||
"kotlin.contracts.ExperimentalContracts",
|
||||
"kotlin.experimental.ExperimentalTypeInference",
|
||||
"kotlin.ExperimentalUnsignedTypes",
|
||||
"kotlin.time.ExperimentalTime",
|
||||
|
||||
"kotlinx.serialization.ExperimentalSerializationApi",
|
||||
|
||||
"net.mamoe.mirai.utils.MiraiInternalApi",
|
||||
"net.mamoe.mirai.utils.MiraiExperimentalApi",
|
||||
"net.mamoe.mirai.LowLevelApi",
|
||||
"kotlinx.serialization.ExperimentalSerializationApi"
|
||||
"net.mamoe.mirai.utils.UnstableExternalImage"
|
||||
)
|
||||
|
||||
fun Project.configureKotlinExperimentalUsages() {
|
||||
val sourceSets = kotlinSourceSets ?: return
|
||||
|
||||
for (target in sourceSets) {
|
||||
target.languageSettings.progressiveMode = true
|
||||
target.languageSettings.enableLanguageFeature("InlineClasses")
|
||||
experimentalAnnotations.forEach { a ->
|
||||
target.languageSettings.useExperimentalAnnotation(a)
|
||||
target.languageSettings.progressiveMode = true
|
||||
target.languageSettings.enableLanguageFeature("InlineClasses")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user