[Gradle][tests] Disable workaround for XCode 12.3

This commit is contained in:
Ilya Matveev
2021-06-23 16:08:41 +07:00
committed by TeamCityServer
parent 53a4187427
commit 5fad5e017e
@@ -1405,7 +1405,6 @@ class CocoaPodsIT : BaseGradleIT() {
fun installPodGen() {
if (cocoapodsInstallationRequired) {
if (cocoapodsInstallationAllowed) {
WorkaroundForXcode12_3.apply()
gem("install", "--install-dir", cocoapodsInstallationRoot.absolutePath, "cocoapods", "cocoapods-generate")
} else {
fail(
@@ -1420,14 +1419,6 @@ class CocoaPodsIT : BaseGradleIT() {
}
}
@AfterClass
@JvmStatic
fun disposeWorkarounds() {
if (cocoapodsInstallationRequired && cocoapodsInstallationAllowed) {
WorkaroundForXcode12_3.dispose()
}
}
private val cocoapodsInstallationRequired: Boolean by lazy {
!isCocoapodsInstalled() || !isPodGenInstalled()
}
@@ -1469,35 +1460,5 @@ class CocoaPodsIT : BaseGradleIT() {
}
return result.output
}
// Workaround the issue with Ruby paths for Xcode 12.3.
// See: https://github.com/CocoaPods/CocoaPods/issues/10286#issuecomment-750403566
private object WorkaroundForXcode12_3 {
private val xcodeRubyRoot = File(
"/Applications/Xcode.app/Contents/Developer/Platforms/" +
"MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library" +
"/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0"
)
private val original = xcodeRubyRoot.resolve("universal-darwin20").toPath()
private var link: Path? = null
fun apply() {
val linkFile = xcodeRubyRoot.resolve("universal-darwin19")
if (!linkFile.exists() && Files.exists(original)) {
Files.createSymbolicLink(linkFile.toPath(), original)
linkFile.deleteOnExit()
link = linkFile.toPath()
}
}
fun dispose() {
link?.let { link ->
// We created the link, so now we should delete it.
if (Files.isSymbolicLink(link) && Files.readSymbolicLink(link) == original) {
Files.delete(link)
}
}
}
}
}
}