Skip to content

Commit 3de7603

Browse files
author
luigi
committed
fix
1 parent ee3c5de commit 3de7603

File tree

7 files changed

+33
-52
lines changed

7 files changed

+33
-52
lines changed

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/CodegenVisitor.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import software.amazon.smithy.kotlin.codegen.rendering.*
2121
import software.amazon.smithy.kotlin.codegen.rendering.protocol.ApplicationProtocol
2222
import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator
2323
import software.amazon.smithy.kotlin.codegen.service.AbstractStubGenerator
24-
import software.amazon.smithy.kotlin.codegen.service.buildScript
2524
import software.amazon.smithy.model.Model
2625
import software.amazon.smithy.model.knowledge.ServiceIndex
2726
import software.amazon.smithy.model.neighbor.Walker
@@ -157,8 +156,6 @@ class CodegenVisitor(context: PluginContext) : ShapeVisitor.Default<Unit>() {
157156
if (generateServiceProject) {
158157
val serviceStubGenerator: AbstractStubGenerator = settings.serviceStub.framework.getServiceFrameworkGenerator(baseGenerationContext, writers, fileManifest)
159158
serviceStubGenerator.render()
160-
161-
buildScript(fileManifest)
162159
}
163160

164161
writers.finalize()

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/service/BuildScriptGenerator.kt

Lines changed: 0 additions & 46 deletions
This file was deleted.

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/service/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ While Ktor is the default backend, the architecture is framework-agnostic, allow
2929
- `ServiceStubGenerator.kt` – abstract service stub generator file.
3030
- `ServiceTypes.kt` – file that includes service component symbols.
3131
- `utils.kt` – utilities file.
32-
- `BuildScriptGenerator.kt` – build scripts generator file.
3332

3433
### Testing
3534

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/service/docs/GettingStarted.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ Run:
140140

141141
If you want to prevent accidentally losing previous build, use the provided scripts instead:
142142

143-
Linux / macOS:
143+
You can find script for Linux / macOS [here](../../../../../../../../../../../../examples/service-codegen/build.sh):
144144
```bash
145145
chmod +x build.sh
146146
./build.sh
147147
```
148148

149-
Windows:
149+
You can find script for Windows [here](../../../../../../../../../../../../examples/service-codegen/build.bat):
150150
```bash
151151
icacls build.bat /grant %USERNAME%:RX
152152
.\build.bat

examples/service-codegen/build.bat

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@echo off
2+
if exist build (
3+
set /p choice="The 'build' directory already exists. Removing it will delete previous build artifacts. Continue? (y/n): "
4+
if /i "%choice%"=="y" (
5+
gradle clean
6+
echo Previous build directory removed.
7+
) else (
8+
echo Aborted.
9+
exit /b 1
10+
)
11+
)
12+
13+
gradle build

examples/service-codegen/build.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
if [ -d "build" ]; then
4+
read -p "The 'build' directory already exists. Removing it will delete previous build artifacts. Continue? (y/n): " choice
5+
case "$choice" in
6+
y|Y )
7+
gradle clean
8+
echo "Previous build directory removed."
9+
;;
10+
* )
11+
echo "Aborted."
12+
exit 1
13+
;;
14+
esac
15+
fi
16+
17+
gradle build

tests/codegen/service-codegen-tests/src/test/kotlin/com/test/ServiceEngineFactoryTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class ServiceEngineFactoryTest {
2626
fun `checks service with netty engine`() {
2727
val nettyPort: Int = ServerSocket(0).use { it.localPort }
2828
val nettyProc = startService("netty", nettyPort, closeGracePeriodMillis, closeTimeoutMillis, requestBodyLimit, projectDir)
29+
2930
val ready = waitForPort(nettyPort, portListenerTimeout)
3031
assertTrue(ready, "Service did not start within $portListenerTimeout s")
3132
cleanupService(nettyProc, gracefulWindow)

0 commit comments

Comments
 (0)