Use new syntax for '.gradle.kts' files in AddKotlinLibQuickFix
^KT-25403 Fixed
This commit is contained in:
+8
-3
@@ -119,9 +119,14 @@ class KotlinBuildScriptManipulator(
|
||||
libraryDescriptor: ExternalLibraryDescriptor,
|
||||
isAndroidModule: Boolean
|
||||
) {
|
||||
val kotlinLibraryVersion = libraryDescriptor.maxVersion.let {
|
||||
if (it == GSK_KOTLIN_VERSION_PROPERTY_NAME) "\$$it" else it
|
||||
}
|
||||
val kotlinLibraryVersion = libraryDescriptor.maxVersion
|
||||
.takeIf {
|
||||
!useNewSyntax(if (isAndroidModule) "kotlin-android" else KotlinGradleModuleConfigurator.KOTLIN)
|
||||
}
|
||||
.let {
|
||||
if (it == GSK_KOTLIN_VERSION_PROPERTY_NAME) "\$$it" else it
|
||||
}
|
||||
|
||||
scriptFile.getDependenciesBlock()?.apply {
|
||||
addExpressionIfMissing(
|
||||
getCompileDependencySnippet(
|
||||
|
||||
Reference in New Issue
Block a user