Native: rename Xcode.current to .findCurrent()

To reflect that it is a non-trivial operation with possible performance
overhead.
This commit is contained in:
Svyatoslav Scherbina
2022-02-11 16:30:25 +03:00
committed by Space
parent e92f7b5ec3
commit 5afbbecea4
5 changed files with 12 additions and 7 deletions
@@ -55,7 +55,7 @@ class AppleConfigurablesImpl(
if (InternalServer.isAvailable) {
XcodePartsProvider.InternalServer
} else {
val xcode = Xcode.current
val xcode = Xcode.findCurrent()
if (properties.getProperty("ignoreXcodeVersionCheck") != "true") {
properties.getProperty("minimalXcodeVersion")?.let { minimalXcodeVersion ->
@@ -56,8 +56,11 @@ interface Xcode {
companion object {
// Don't cache the instance: the compiler might be executed in a Gradle daemon process,
// so current Xcode might actually change between different invocations.
@Deprecated("", ReplaceWith("this.findCurrent()"), DeprecationLevel.WARNING)
val current: Xcode
get() = CurrentXcode()
get() = findCurrent()
fun findCurrent(): Xcode = CurrentXcode()
}
}