[KLIB Resolver] Deprecate UnresolvedLibrary.substitutePath()
This method in unused in Kotlin compiler and IDEA plugin.
This commit is contained in:
committed by
Space Team
parent
1015ae858e
commit
2b1fc51f89
@@ -11,13 +11,21 @@ fun UnresolvedLibrary(path: String, libraryVersion: String?, lenient: Boolean):
|
||||
sealed class UnresolvedLibrary {
|
||||
abstract val path: String
|
||||
abstract val libraryVersion: String?
|
||||
|
||||
@Deprecated(DEPRECATED_SUBSTITUTE_PATH, level = DeprecationLevel.ERROR)
|
||||
abstract fun substitutePath(newPath: String): UnresolvedLibrary
|
||||
|
||||
companion object {
|
||||
const val DEPRECATED_SUBSTITUTE_PATH =
|
||||
"UnresolvedLibrary.substitutePath() is deprecated and is going to be removed in one of the future Kotlin releases"
|
||||
}
|
||||
}
|
||||
|
||||
data class RequiredUnresolvedLibrary(
|
||||
override val path: String,
|
||||
override val libraryVersion: String?
|
||||
) : UnresolvedLibrary() {
|
||||
@Deprecated(DEPRECATED_SUBSTITUTE_PATH, ReplaceWith("copy(path = newPath)"), level = DeprecationLevel.ERROR)
|
||||
override fun substitutePath(newPath: String): RequiredUnresolvedLibrary {
|
||||
return copy(path = newPath)
|
||||
}
|
||||
@@ -27,6 +35,7 @@ data class LenientUnresolvedLibrary(
|
||||
override val path: String,
|
||||
override val libraryVersion: String?
|
||||
) : UnresolvedLibrary() {
|
||||
@Deprecated(DEPRECATED_SUBSTITUTE_PATH, ReplaceWith("copy(path = newPath)"), level = DeprecationLevel.ERROR)
|
||||
override fun substitutePath(newPath: String): LenientUnresolvedLibrary {
|
||||
return copy(path = newPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user