diff --git a/AWSSDKSwiftCLI/Sources/AWSCLIUtils/FileManager+Utils.swift b/AWSSDKSwiftCLI/Sources/AWSCLIUtils/FileManager+Utils.swift index 0634759c588..3b8a38414b8 100644 --- a/AWSSDKSwiftCLI/Sources/AWSCLIUtils/FileManager+Utils.swift +++ b/AWSSDKSwiftCLI/Sources/AWSCLIUtils/FileManager+Utils.swift @@ -57,6 +57,8 @@ public extension FileManager { .contentsOfDirectory(atPath: "../smithy-swift/Sources") .sorted() .filter { $0 != "libxml2" } // Ignore libxml module + .filter { $0 != "SmithyCodegenCLI" } // Ignore codegen component + .filter { $0 != "SmithyCodegenCore" } // Ignore codegen component .filter { !$0.hasPrefix(".") } } diff --git a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.txt b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.txt index dcbe1cecd18..88ab28d028a 100644 --- a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.txt +++ b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.txt @@ -42,6 +42,11 @@ extension Target.Dependency { static var SmithyXML: Self { .product(name: "SmithyXML", package: "smithy-swift") } } +extension Target.PluginUsage { + // Smithy plugins + static var SmithyCodeGenerator: Self { .plugin(name: "SmithyCodeGenerator", package: "smithy-swift") } +} + // MARK: Base Package let package = Package( @@ -198,22 +203,26 @@ private var runtimeTargets: [Target] { .target( name: "InternalAWSSTS", dependencies: internalAWSSTSDependencies, - path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSTS/Sources/InternalAWSSTS" + path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSTS/Sources/InternalAWSSTS", + plugins: [.SmithyCodeGenerator] ), .target( name: "InternalAWSSSO", dependencies: internalAWSSSODependencies, - path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSSO/Sources/InternalAWSSSO" + path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSSO/Sources/InternalAWSSSO", + plugins: [.SmithyCodeGenerator] ), .target( name: "InternalAWSSSOOIDC", dependencies: internalAWSSSOOIDCDependencies, - path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSSOOIDC/Sources/InternalAWSSSOOIDC" + path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSSOOIDC/Sources/InternalAWSSSOOIDC", + plugins: [.SmithyCodeGenerator] ), .target( name: "InternalAWSCognitoIdentity", dependencies: internalAWSCognitoIdentityDependencies, - path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSCognitoIdentity/Sources/InternalAWSCognitoIdentity" + path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSCognitoIdentity/Sources/InternalAWSCognitoIdentity", + plugins: [.SmithyCodeGenerator] ), .target( name: "AWSSDKChecksums", @@ -286,7 +295,8 @@ private func target(_ service: String, _ dependencies: [Target.Dependency]) -> T .target( name: service, dependencies: dependencies, - path: "Sources/Services/\(service)/Sources/\(service)" + path: "Sources/Services/\(service)/Sources/\(service)", + plugins: [.SmithyCodeGenerator] ) } diff --git a/Package.swift b/Package.swift index a6c715a9e8c..38964be41b8 100644 --- a/Package.swift +++ b/Package.swift @@ -480,6 +480,11 @@ extension Target.Dependency { static var SmithyXML: Self { .product(name: "SmithyXML", package: "smithy-swift") } } +extension Target.PluginUsage { + // Smithy plugins + static var SmithyCodeGenerator: Self { .plugin(name: "SmithyCodeGenerator", package: "smithy-swift") } +} + // MARK: Base Package let package = Package( @@ -636,22 +641,26 @@ private var runtimeTargets: [Target] { .target( name: "InternalAWSSTS", dependencies: internalAWSSTSDependencies, - path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSTS/Sources/InternalAWSSTS" + path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSTS/Sources/InternalAWSSTS", + plugins: [.SmithyCodeGenerator] ), .target( name: "InternalAWSSSO", dependencies: internalAWSSSODependencies, - path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSSO/Sources/InternalAWSSSO" + path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSSO/Sources/InternalAWSSSO", + plugins: [.SmithyCodeGenerator] ), .target( name: "InternalAWSSSOOIDC", dependencies: internalAWSSSOOIDCDependencies, - path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSSOOIDC/Sources/InternalAWSSSOOIDC" + path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSSSOOIDC/Sources/InternalAWSSSOOIDC", + plugins: [.SmithyCodeGenerator] ), .target( name: "InternalAWSCognitoIdentity", dependencies: internalAWSCognitoIdentityDependencies, - path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSCognitoIdentity/Sources/InternalAWSCognitoIdentity" + path: "Sources/Core/AWSSDKIdentity/InternalClients/InternalAWSCognitoIdentity/Sources/InternalAWSCognitoIdentity", + plugins: [.SmithyCodeGenerator] ), .target( name: "AWSSDKChecksums", @@ -724,7 +733,8 @@ private func target(_ service: String, _ dependencies: [Target.Dependency]) -> T .target( name: service, dependencies: dependencies, - path: "Sources/Services/\(service)/Sources/\(service)" + path: "Sources/Services/\(service)/Sources/\(service)", + plugins: [.SmithyCodeGenerator] ) } diff --git a/scripts/codegen.sh b/scripts/codegen.sh index 2574b9ad633..d3909b12813 100755 --- a/scripts/codegen.sh +++ b/scripts/codegen.sh @@ -24,6 +24,7 @@ rm -rf ServiceClients/* rm -rf Sources/Services/* rm -rf Tests/Services/* rm -rf SmokeTests/* +rm -rf Sources/Core/AWSIdentity/InternalClients/* # Regenerate code ./gradlew -p codegen/sdk-codegen build