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,
|
libraryDescriptor: ExternalLibraryDescriptor,
|
||||||
isAndroidModule: Boolean
|
isAndroidModule: Boolean
|
||||||
) {
|
) {
|
||||||
val kotlinLibraryVersion = libraryDescriptor.maxVersion.let {
|
val kotlinLibraryVersion = libraryDescriptor.maxVersion
|
||||||
if (it == GSK_KOTLIN_VERSION_PROPERTY_NAME) "\$$it" else it
|
.takeIf {
|
||||||
}
|
!useNewSyntax(if (isAndroidModule) "kotlin-android" else KotlinGradleModuleConfigurator.KOTLIN)
|
||||||
|
}
|
||||||
|
.let {
|
||||||
|
if (it == GSK_KOTLIN_VERSION_PROPERTY_NAME) "\$$it" else it
|
||||||
|
}
|
||||||
|
|
||||||
scriptFile.getDependenciesBlock()?.apply {
|
scriptFile.getDependenciesBlock()?.apply {
|
||||||
addExpressionIfMissing(
|
addExpressionIfMissing(
|
||||||
getCompileDependencySnippet(
|
getCompileDependencySnippet(
|
||||||
|
|||||||
Reference in New Issue
Block a user