From 5fad5e017ec91925c522f00873a28007b85bef4d Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Wed, 23 Jun 2021 16:08:41 +0700 Subject: [PATCH] [Gradle][tests] Disable workaround for XCode 12.3 --- .../kotlin/gradle/native/CocoaPodsIT.kt | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/CocoaPodsIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/CocoaPodsIT.kt index 8a2c2fbf419..f7fdbef27f5 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/CocoaPodsIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/CocoaPodsIT.kt @@ -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) - } - } - } - } } } \ No newline at end of file