@@ -18,7 +18,7 @@ Initial setup: Gradle (recommended)
18
18
19
19
To generate a Java client for a service, start by creating a new Smithy Gradle project.
20
20
21
- The ``smithy init` `` CLI command can be used to create a new Smithy Gradle project:
21
+ The ``smithy init `` CLI command can be used to create a new Smithy Gradle project:
22
22
23
23
.. code-block :: sh
24
24
@@ -43,10 +43,10 @@ and execute build plugins:
43
43
.. code-block :: diff
44
44
:caption: build.gradle.kts
45
45
46
- plugins {
47
- `java-library`
48
- + id("software.amazon.smithy.gradle.smithy-base") version "__smithy_gradle_version__"
49
- }
46
+ plugins {
47
+ `java-library`
48
+ + id("software.amazon.smithy.gradle.smithy-base") version "__smithy_gradle_version__"
49
+ }
50
50
51
51
Add the following dependencies to your project:
52
52
@@ -84,16 +84,16 @@ your :ref:`smithy-build <smithy-build>` config:
84
84
.. code-block :: diff
85
85
:caption: smithy-build.json
86
86
87
- {
88
- "version": "1.0",
89
- "plugins": {
90
- + "java-client-codegen": {
91
- + "service": "com.example#CoffeeShop", // <- Replace with your service's ID
92
- + // Generated Java code will use this as the root package namespace
93
- + "namespace": "com.example.cafe"
94
- + }
95
- }
96
- }
87
+ {
88
+ "version": "1.0",
89
+ "plugins": {
90
+ + "java-client-codegen": {
91
+ + "service": "com.example#CoffeeShop", // <- Replace with your service's ID
92
+ + // Generated Java code will use this as the root package namespace
93
+ + "namespace": "com.example.cafe"
94
+ + }
95
+ }
96
+ }
97
97
98
98
----------------------------------------
99
99
Add generated code to the Java sourceSet
@@ -162,7 +162,7 @@ Gradle project to generate a Smithy Java client:
162
162
implementation("...")
163
163
164
164
// Add the client-core dependency needed by the generated code
165
- implementation("software.amazon.smithy.java:client-core:__smithy_java_version__"" )
165
+ implementation("software.amazon.smithy.java:client-core:__smithy_java_version__")
166
166
167
167
// Also add your protocol implementations or auth schemes as dependencies
168
168
implementation("com.example:my-protocol:1.0.0")
0 commit comments