Add AnalysisFlags.metadataCompilation flag
It's `true` if metadata compilation mode is activated It's being initialized in K2MetadataCompilerArguments
This commit is contained in:
committed by
Space Team
parent
2364ffb299
commit
abdb173f6c
+9
@@ -16,7 +16,11 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.cli.common.arguments
|
package org.jetbrains.kotlin.cli.common.arguments
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
|
||||||
|
import org.jetbrains.kotlin.config.AnalysisFlag
|
||||||
|
import org.jetbrains.kotlin.config.AnalysisFlags
|
||||||
import org.jetbrains.kotlin.config.LanguageFeature
|
import org.jetbrains.kotlin.config.LanguageFeature
|
||||||
|
import org.jetbrains.kotlin.config.LanguageVersion
|
||||||
|
|
||||||
class K2MetadataCompilerArguments : CommonCompilerArguments() {
|
class K2MetadataCompilerArguments : CommonCompilerArguments() {
|
||||||
companion object {
|
companion object {
|
||||||
@@ -83,6 +87,11 @@ class K2MetadataCompilerArguments : CommonCompilerArguments() {
|
|||||||
|
|
||||||
override fun copyOf(): Freezable = copyK2MetadataCompilerArguments(this, K2MetadataCompilerArguments())
|
override fun copyOf(): Freezable = copyK2MetadataCompilerArguments(this, K2MetadataCompilerArguments())
|
||||||
|
|
||||||
|
override fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> =
|
||||||
|
super.configureAnalysisFlags(collector, languageVersion).also {
|
||||||
|
it[AnalysisFlags.metadataCompilation] = true
|
||||||
|
}
|
||||||
|
|
||||||
override fun configureExtraLanguageFeatures(map: HashMap<LanguageFeature, LanguageFeature.State>) {
|
override fun configureExtraLanguageFeatures(map: HashMap<LanguageFeature, LanguageFeature.State>) {
|
||||||
map[LanguageFeature.MultiPlatformProjects] = LanguageFeature.State.ENABLED
|
map[LanguageFeature.MultiPlatformProjects] = LanguageFeature.State.ENABLED
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ object AnalysisFlags {
|
|||||||
@JvmStatic
|
@JvmStatic
|
||||||
val skipMetadataVersionCheck by AnalysisFlag.Delegates.Boolean
|
val skipMetadataVersionCheck by AnalysisFlag.Delegates.Boolean
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
val metadataCompilation by AnalysisFlag.Delegates.Boolean
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val skipPrereleaseCheck by AnalysisFlag.Delegates.Boolean
|
val skipPrereleaseCheck by AnalysisFlag.Delegates.Boolean
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user