-
Notifications
You must be signed in to change notification settings - Fork 55
service protocol build control #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,7 @@ To see list of all projects run `./gradlew projects` | |
| See the local.properties definition above to specify this in a config file. | ||
|
|
||
| ```sh | ||
| ./gradlew -Paws.services=lambda :codegen:sdk:bootstrap | ||
| ./gradlew -Paws.services=+lambda :codegen:sdk:bootstrap | ||
| ``` | ||
|
|
||
| ##### Testing Locally | ||
|
|
@@ -65,20 +65,51 @@ This will output HTML formatted documentation to `build/dokka/htmlMultiModule` | |
|
|
||
| NOTE: You currently need an HTTP server to view the documentation in browser locally. You can either use the builtin server in Intellij or use your favorite local server (e.g. `python3 -m http.server`). See [Kotlin/dokka#1795](https://github.com/Kotlin/dokka/issues/1795) | ||
|
|
||
| ### Build properties | ||
| ### Build Properties | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix The intent of this section was to document the available build properties. The new section you added with the examples is fine and can remain as is but I still think we ought to document the available properties in one place.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I added a table that describes all available properties directly in this section. |
||
|
|
||
| You can define a `local.properties` config file at the root of the project to modify build behavior. | ||
|
|
||
| An example config with the various properties is below: | ||
| |Property|Description| | ||
| |---|---| | ||
| |`compositeProjects`|Specify paths to repos the SDK depends upon such as `smithy-kotlin`| | ||
| |`aws.services`|Specify inclusions (+ prefix) and exclusions (- prefix) of service names to generate| | ||
| |`aws.protocols`|Specify inclusions (+ prefix) and exclusions (- prefix) of AWS protocols to generate| | ||
|
|
||
| ``` | ||
| #### Composite Projects | ||
|
|
||
| Dependencies of the SDK can be added as composite build such that multiple repos may appear as one | ||
| holistic source project in the IDE. | ||
|
|
||
| ```ini | ||
| # comma separated list of paths to `includeBuild()` | ||
| # This is useful for local development of smithy-kotlin in particular | ||
| compositeProjects=../smithy-kotlin | ||
| ``` | ||
|
|
||
| #### Generating Specific Services Based on Name or Protocol | ||
|
|
||
| # comma separated list of services to generate from codegen/sdk/aws-models. When not specified all services are generated | ||
| # service names match the filenames in the models directory `service.VERSION.json` | ||
| aws.services=lambda | ||
| A comma separated list of services to include or exclude for generation from codegen/sdk/aws-models may | ||
| be specified with the `aws.services` property. A list of protocols of services to generate may be specified | ||
| with the `aws.protocols` property. | ||
|
|
||
| Included services require a '+' character prefix and excluded services require a '-' character. | ||
| If any items are specified for inclusion, only specified included members will be generated. If no items | ||
| are specified for inclusion, all members not excluded will be generated. | ||
| When unspecified all services found in the directory specified by the `modelsDir` property are generated. | ||
| Service names match the filenames in the models directory `service.VERSION.json`. | ||
|
|
||
| Some example entries for `local.properties`: | ||
| ```ini | ||
| # Generate only AWS Lambda: | ||
| aws.services=+lambda | ||
| ``` | ||
|
|
||
| ```ini | ||
| # Generate all services but AWS location and AWS DynamoDB: | ||
| aws.services=-location,-dynamodb | ||
| ``` | ||
|
|
||
| ```ini | ||
| # Generate all services except those using the restJson1 protocol: | ||
| aws.protocols=-restJson1 | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question
should we retain
+as optional? It would maintain the current behavior and make e.g. generating a handful of services less ceremoniousaws.services=+lambda,+s3,+iamThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was thinking about that too. I went back and forth but slightly favor requiring requiring the plus for these reasons:
+self-documents the feature that exclusions are also available.IMHO these are a bit stronger than the convenience argument