Przeglądaj źródła

Distinguish cocoapods builds

Florian Friedrich 8 miesięcy temu
rodzic
commit
a52910aa6a

+ 4 - 0
Scripts/generate-podspec.sh

@@ -155,6 +155,10 @@ Pod::Spec.new do |s|
   s.visionos.deployment_target = '${VISIONOS_SDK}'
   s.watchos.deployment_target  = '${WATCHOS_SDK}'
 
+  s.pod_target_xcconfig = {
+    'OTHER_SWIFT_FLAGS' => '\$(inherited) -DCOCOAPODS'
+  }
+
   s.preserve_paths = 'README.md', 'LICENSE'
 
   s.default_subspecs = 'Core'

+ 4 - 1
Sources/CocoaLumberjackSwift/ConfigurationGlobals.swift

@@ -16,9 +16,12 @@
 #if canImport(Synchronization)
 public import Synchronization
 #endif
+#if SWIFT_PACKAGE
+public import CocoaLumberjack
+#endif
 
 #if canImport(Synchronization)
-#if SWIFT_PACKAGE && compiler(>=6.0)
+#if compiler(>=6.0) && !COCOAPODS // CocoaPods seems to merge the modules.
 @available(macOS 15, iOS 18, tvOS 18, watchOS 11, visionOS 2, *)
 extension DDLogLevel: @retroactive AtomicRepresentable {}
 #else