mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-11 03:24:47 +08:00
Try useExperimentalAnnotation
if optIn
not defined
This commit is contained in:
parent
7f85319a92
commit
112bf537cc
@ -36,7 +36,12 @@ public class MiraiConsoleGradlePlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
private fun KotlinSourceSet.configureSourceSet(project: Project, target: KotlinTarget) {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
try {
|
||||
languageSettings.optIn("kotlin.RequiresOptIn")
|
||||
} catch (e: NoSuchMethodError) {
|
||||
@Suppress("DEPRECATION")
|
||||
languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn")
|
||||
}
|
||||
dependencies { configureDependencies(project, this@configureSourceSet, target) }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user