@@ -31,6 +31,8 @@ let package = Package(
3131 products: [
3232 . library( name: " Smithy " , targets: [ " Smithy " ] ) ,
3333 . library( name: " SmithySerialization " , targets: [ " SmithySerialization " ] ) ,
34+ . library( name: " SmithyAWSJSON " , targets: [ " SmithyAWSJSON " ] ) ,
35+ . library( name: " SmithyRPCv2CBOR " , targets: [ " SmithyRPCv2CBOR " ] ) ,
3436 . library( name: " ClientRuntime " , targets: [ " ClientRuntime " ] ) ,
3537 . library( name: " SmithyRetriesAPI " , targets: [ " SmithyRetriesAPI " ] ) ,
3638 . library( name: " SmithyRetries " , targets: [ " SmithyRetries " ] ) ,
@@ -51,16 +53,17 @@ let package = Package(
5153 . library( name: " SmithyStreams " , targets: [ " SmithyStreams " ] ) ,
5254 . library( name: " SmithyChecksumsAPI " , targets: [ " SmithyChecksumsAPI " ] ) ,
5355 . library( name: " SmithyChecksums " , targets: [ " SmithyChecksums " ] ) ,
54- . library( name: " SmithyCBOR " , targets: [ " SmithyCBOR " ] ) ,
5556 . library( name: " SmithyWaitersAPI " , targets: [ " SmithyWaitersAPI " ] ) ,
5657 . library( name: " SmithyTestUtil " , targets: [ " SmithyTestUtil " ] ) ,
5758 . library( name: " SmithySwiftNIO " , targets: [ " SmithySwiftNIO " ] ) ,
5859 . library( name: " SmithyTelemetryAPI " , targets: [ " SmithyTelemetryAPI " ] ) ,
5960 . library( name: " SmithyHTTPClientAPI " , targets: [ " SmithyHTTPClientAPI " ] ) ,
61+ . plugin( name: " SmithyCodeGeneratorPlugin " , targets: [ " SmithyCodeGeneratorPlugin " ] ) ,
6062 ] ,
6163 dependencies: {
6264 var dependencies : [ Package . Dependency ] = [
6365 . package ( url: " https://github.com/awslabs/aws-crt-swift.git " , exact: " 0.58.1 " ) ,
66+ . package ( url: " https://github.com/apple/swift-argument-parser.git " , from: " 1.1.0 " ) ,
6467 . package ( url: " https://github.com/apple/swift-log.git " , from: " 1.0.0 " ) ,
6568 . package ( url: " https://github.com/swift-server/async-http-client.git " , from: " 1.22.0 " ) ,
6669 ]
@@ -118,6 +121,7 @@ let package = Package(
118121 " SmithyChecksumsAPI " ,
119122 " SmithyChecksums " ,
120123 " SmithyCBOR " ,
124+ " SmithySerialization " ,
121125 . product( name: " AwsCommonRuntimeKit " , package : " aws-crt-swift " ) ,
122126 ] ,
123127 resources: [
@@ -231,6 +235,7 @@ let package = Package(
231235 name: " SmithyEventStreams " ,
232236 dependencies: [
233237 " Smithy " ,
238+ " SmithySerialization " ,
234239 " SmithyEventStreamsAPI " ,
235240 " SmithyEventStreamsAuthAPI " ,
236241 . product( name: " AwsCommonRuntimeKit " , package : " aws-crt-swift " )
@@ -261,14 +266,55 @@ let package = Package(
261266 . target(
262267 name: " SmithyCBOR " ,
263268 dependencies: [
264- " SmithyReadWrite " ,
265- " SmithyTimestamps " ,
269+ " Smithy " ,
270+ " SmithySerialization " ,
266271 . product( name: " AwsCommonRuntimeKit " , package : " aws-crt-swift " )
267272 ]
268273 ) ,
269274 . target(
270275 name: " SmithyWaitersAPI "
271276 ) ,
277+ . plugin(
278+ name: " SmithyCodeGeneratorPlugin " ,
279+ capability: . buildTool( ) ,
280+ dependencies: [
281+ " SmithyCodegenCLI " ,
282+ ]
283+ ) ,
284+ . executableTarget(
285+ name: " SmithyCodegenCLI " ,
286+ dependencies: [
287+ " SmithyCodegenCore " ,
288+ . product( name: " ArgumentParser " , package : " swift-argument-parser " ) ,
289+ ]
290+ ) ,
291+ . target(
292+ name: " SmithyCodegenCore " ,
293+ dependencies: [
294+ " Smithy " ,
295+ " SmithySerialization " ,
296+ ] ,
297+ resources: [ . process( " Resources " ) ]
298+ ) ,
299+ . target(
300+ name: " SmithyAWSJSON " ,
301+ dependencies: [
302+ " ClientRuntime " ,
303+ " Smithy " ,
304+ " SmithySerialization " ,
305+ " SmithyJSON " ,
306+ " SmithyEventStreams " ,
307+ ]
308+ ) ,
309+ . target(
310+ name: " SmithyRPCv2CBOR " ,
311+ dependencies: [
312+ " ClientRuntime " ,
313+ " Smithy " ,
314+ " SmithySerialization " ,
315+ " SmithyCBOR " ,
316+ ]
317+ ) ,
272318 . testTarget(
273319 name: " ClientRuntimeTests " ,
274320 dependencies: [
@@ -279,17 +325,17 @@ let package = Package(
279325 ] ,
280326 resources: [ . process( " Resources " ) ]
281327 ) ,
328+ . testTarget(
329+ name: " SmithyTests " ,
330+ dependencies: [ " Smithy " ]
331+ ) ,
282332 . testTarget(
283333 name: " SmithySwiftNIOTests " ,
284334 dependencies: [
285335 " SmithySwiftNIO " ,
286336 " SmithyTestUtil " ,
287337 ]
288338 ) ,
289- . testTarget(
290- name: " SmithyCBORTests " ,
291- dependencies: [ " SmithyCBOR " , " ClientRuntime " , " SmithyTestUtil " ]
292- ) ,
293339 . testTarget(
294340 name: " SmithyHTTPClientTests " ,
295341 dependencies: [
@@ -352,5 +398,28 @@ let package = Package(
352398 name: " SmithyStreamsTests " ,
353399 dependencies: [ " SmithyStreams " , " Smithy " ]
354400 ) ,
401+ . testTarget(
402+ name: " SmithyCodegenCoreTests " ,
403+ dependencies: [ " SmithyCodegenCore " ] ,
404+ resources: [ . process( " Resources " ) ]
405+ ) ,
406+ . target(
407+ name: " RPCv2CBORTestSDK " ,
408+ dependencies: [
409+ " ClientRuntime " ,
410+ " SmithyHTTPAPI " ,
411+ " SmithyHTTPAuthAPI " ,
412+ " SmithyIdentity " ,
413+ " SmithyRPCv2CBOR " ,
414+ " SmithyRetries " ,
415+ " SmithyRetriesAPI " ,
416+ ] ,
417+ path: " test-sdks/build/smithyprojections/test-sdks/rpcv2cbor/swift-codegen/Sources/RPCv2CBORTestSDK " ,
418+ plugins: [ " SmithyCodeGeneratorPlugin " ]
419+ ) ,
420+ . testTarget(
421+ name: " SmithySerializationTests " ,
422+ dependencies: [ " SmithySerialization " , " RPCv2CBORTestSDK " ]
423+ ) ,
355424 ] . compactMap { $0 }
356425)
0 commit comments