[kotlin] Put configureLibraryJar() in KotlinWithLibraryConfigurator under WA for configureModuleWithLibrary()

KTIJ-31449

GitOrigin-RevId: a26bfde0489c2d5e28e33bfe9fcd89c402a2061e
This commit is contained in:
Victoria.Petrakovich
2024-09-30 15:16:14 +02:00
committed by intellij-monorepo-bot
parent af027acdf3
commit 89c5ef7b75

View File

@@ -217,10 +217,12 @@ abstract class KotlinWithLibraryConfigurator<P : LibraryProperties<*>> protected
?: error("Kotlin Library has to be created in advance")) as LibraryEx
library.modifiableModel.let { libraryModel ->
configureLibraryJar(project, libraryModel, libraryJarDescriptor, collector, ProgressManager.getGlobalProgressIndicator())
// commit will be performed later on EDT
writeActions.addOrExecute { runWriteAction { libraryModel.commit() } }
// will be performed later on EDT
writeActions.addOrExecute { runWriteAction {
configureLibraryJar(project, libraryModel, libraryJarDescriptor, collector, ProgressManager.getGlobalProgressIndicator())
libraryModel.commit()
}
}
}
addLibraryToModuleIfNeeded(module, library, collector, writeActions)
@@ -235,6 +237,10 @@ abstract class KotlinWithLibraryConfigurator<P : LibraryProperties<*>> protected
}
}
/**
* Updates KotlinJavaRuntime.xml
* Should be performed under a write action.
*/
fun configureLibraryJar(
project: Project,
library: LibraryEx.ModifiableModelEx,