[Gradle] Add workaround for Configuration Cache deserialization
Gradle Configuration Cache deserializer doesn't support Kotlin's Objects of a Sealed Class. It creates new instance upon deserialization and thus breaking equals contract in kotlin when's constructions. See more info: https://github.com/gradle/gradle/issues/22347 ^KT-54362 ^KT-54339 Verification Pending
This commit is contained in:
committed by
Space Team
parent
4cda8f35bc
commit
a7f33819fa
+7
-4
@@ -244,10 +244,13 @@ open class FatFrameworkTask : DefaultTask() {
|
||||
|
||||
private val FrameworkDescriptor.plistPlatform: String
|
||||
get() = when (target) {
|
||||
MACOS_X64, MACOS_ARM64 -> "MacOSX"
|
||||
IOS_ARM32, IOS_ARM64, IOS_X64, IOS_SIMULATOR_ARM64 -> "iPhoneOS"
|
||||
TVOS_ARM64, TVOS_X64, TVOS_SIMULATOR_ARM64 -> "AppleTVOS"
|
||||
WATCHOS_ARM32, WATCHOS_ARM64, WATCHOS_X86, WATCHOS_X64, WATCHOS_SIMULATOR_ARM64, WATCHOS_DEVICE_ARM64 -> "WatchOS"
|
||||
// remove `is ...` after Gradle Configuration Cache deserialization for Objects of a Sealed Class is fixed
|
||||
// https://github.com/gradle/gradle/issues/22347
|
||||
is MACOS_X64, is MACOS_ARM64 -> "MacOSX"
|
||||
is IOS_ARM32, is IOS_ARM64, is IOS_X64, is IOS_SIMULATOR_ARM64 -> "iPhoneOS"
|
||||
is TVOS_ARM64, is TVOS_X64, is TVOS_SIMULATOR_ARM64 -> "AppleTVOS"
|
||||
is WATCHOS_ARM32, is WATCHOS_ARM64, is WATCHOS_X86,
|
||||
is WATCHOS_X64, is WATCHOS_SIMULATOR_ARM64, is WATCHOS_DEVICE_ARM64 -> "WatchOS"
|
||||
else -> error("Fat frameworks are not supported for platform `${target.visibleName}`")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user