From ab1ce759a3ad2fabbf1202d35446927faba91e50 Mon Sep 17 00:00:00 2001 From: Yahor Berdnikau Date: Tue, 5 Dec 2023 16:22:39 +0100 Subject: [PATCH] [Gradle] Fix deprecated buildDir usage in IdeBinaryDependencyResolver ^KT-62527 In Progress --- .../dependencyResolvers/IdeBinaryDependencyResolver.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide/dependencyResolvers/IdeBinaryDependencyResolver.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide/dependencyResolvers/IdeBinaryDependencyResolver.kt index ed33e2d460c..54d5a24ee96 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide/dependencyResolvers/IdeBinaryDependencyResolver.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide/dependencyResolvers/IdeBinaryDependencyResolver.kt @@ -184,8 +184,14 @@ class IdeBinaryDependencyResolver @JvmOverloads constructor( } is OpaqueComponentArtifactIdentifier -> { - /* Files within the build directory still require a custom resolver */ - if (artifact.file.absoluteFile.startsWith(sourceSet.project.buildDir.absoluteFile)) return@mapNotNull null + /* Files within the build directory still require a custom resolver */ + if ( + artifact.file.absoluteFile.startsWith( + sourceSet.project.layout.buildDirectory.get().asFile.absoluteFile + ) + ) { + return@mapNotNull null + } IdeaKotlinResolvedBinaryDependency( binaryType = binaryType, coordinates = IdeaKotlinBinaryCoordinates(