Refactor script definitions and resolving/refining infrastructure:
- implement wrappers to wrap old and new API providers and resolvers - make old API deprecated (with error where possible) - drop old internal classes related to the old API - refactor usages accordingly - fix and add missing features to the scripting API where necessary
This commit is contained in:
+6
-6
@@ -65,12 +65,12 @@ class IdeSamWithReceiverComponentContributor(val project: Project) : StorageComp
|
||||
|
||||
val moduleInfo = moduleDescriptor.getCapability(ModuleInfo.Capability)
|
||||
val annotations =
|
||||
when (moduleInfo) {
|
||||
is ScriptModuleInfo -> moduleInfo.scriptDefinition.annotationsForSamWithReceivers
|
||||
is ScriptDependenciesInfo.ForFile -> moduleInfo.scriptDefinition.annotationsForSamWithReceivers
|
||||
is ModuleProductionSourceInfo -> getAnnotationsForModule(moduleInfo.module)
|
||||
else -> null
|
||||
} ?: return
|
||||
when (moduleInfo) {
|
||||
is ScriptModuleInfo -> moduleInfo.scriptDefinition.legacyDefinition.annotationsForSamWithReceivers
|
||||
is ScriptDependenciesInfo.ForFile -> moduleInfo.scriptDefinition.legacyDefinition.annotationsForSamWithReceivers
|
||||
is ModuleProductionSourceInfo -> getAnnotationsForModule(moduleInfo.module)
|
||||
else -> null
|
||||
} ?: return
|
||||
|
||||
container.useInstance(SamWithReceiverResolverExtension(annotations))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user