[Gradle] IdeKotlinSourceDependencyMatcher: Migrate to 'BuildIdentifier.getBuildPath'
^KT-58157 In Progress
This commit is contained in:
committed by
Space Team
parent
9913ea2e20
commit
71e779375f
+2
-2
@@ -10,7 +10,7 @@ import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinSourceDependency
|
||||
|
||||
internal class IdeaKotlinSourceDependencyMatcher(
|
||||
val type: IdeaKotlinSourceDependency.Type,
|
||||
val buildName: String,
|
||||
val buildPath: String,
|
||||
val projectPath: String,
|
||||
val sourceSetName: String
|
||||
) : IdeaKotlinDependencyMatcher {
|
||||
@@ -20,7 +20,7 @@ internal class IdeaKotlinSourceDependencyMatcher(
|
||||
override fun matches(dependency: IdeaKotlinDependency): Boolean {
|
||||
if (dependency !is IdeaKotlinSourceDependency) return false
|
||||
return dependency.type == type &&
|
||||
dependency.coordinates.buildName == buildName &&
|
||||
dependency.coordinates.buildPath == buildPath &&
|
||||
dependency.coordinates.projectPath == projectPath &&
|
||||
dependency.coordinates.sourceSetName == sourceSetName
|
||||
}
|
||||
|
||||
+1
-2
@@ -25,8 +25,7 @@ fun buildIdeaKotlinDependencyMatchers(notation: Any?): List<IdeaKotlinDependency
|
||||
}
|
||||
|
||||
fun ideSourceDependency(type: IdeaKotlinSourceDependency.Type, project: Project, sourceSetName: String): IdeaKotlinDependencyMatcher {
|
||||
@Suppress("DEPRECATION") // Should be fixed via https://youtrack.jetbrains.com/issue/KT-58157
|
||||
return IdeaKotlinSourceDependencyMatcher(type, project.currentBuildId().name, project.path, sourceSetName)
|
||||
return IdeaKotlinSourceDependencyMatcher(type, project.currentBuildId().buildPath, project.path, sourceSetName)
|
||||
}
|
||||
|
||||
fun ideSourceDependency(type: IdeaKotlinSourceDependency.Type, path: String): IdeaKotlinDependencyMatcher {
|
||||
|
||||
Reference in New Issue
Block a user