From f13f9041192ac34049e117c3a3eb2b041e9defd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Stormacq?= Date: Thu, 10 Oct 2024 11:13:01 +0200 Subject: [PATCH] import foundationEssentials for the archiver plugin --- Plugins/AWSLambdaPackager/Plugin.swift | 10 +++++++++- Plugins/AWSLambdaPackager/PluginUtils.swift | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Plugins/AWSLambdaPackager/Plugin.swift b/Plugins/AWSLambdaPackager/Plugin.swift index 916e7bc7..c9aab827 100644 --- a/Plugins/AWSLambdaPackager/Plugin.swift +++ b/Plugins/AWSLambdaPackager/Plugin.swift @@ -12,9 +12,17 @@ // //===----------------------------------------------------------------------===// -import Foundation import PackagePlugin +#if canImport(FoundationEssentials) +import FoundationEssentials +#else +import struct Foundation.URL +import class Foundation.FileManager +import class Foundation.ProcessInfo +import struct Foundation.ObjCBool +#endif + @main @available(macOS 15.0, *) struct AWSLambdaPackager: CommandPlugin { diff --git a/Plugins/AWSLambdaPackager/PluginUtils.swift b/Plugins/AWSLambdaPackager/PluginUtils.swift index 11827200..6cd8e977 100644 --- a/Plugins/AWSLambdaPackager/PluginUtils.swift +++ b/Plugins/AWSLambdaPackager/PluginUtils.swift @@ -13,10 +13,19 @@ //===----------------------------------------------------------------------===// import Dispatch -import Foundation import PackagePlugin import Synchronization +#if canImport(FoundationEssentials) +import FoundationEssentials +#else +import struct Foundation.URL +import struct Foundation.CharacterSet +import struct Foundation.Data +import class Foundation.Pipe +import class Foundation.Process +#endif + @available(macOS 15.0, *) struct Utils { @discardableResult