Commit bab3bbb
authored
Fix Gradle task to properly detect Smithy model changes (#4326)
The `generateSmithyBuild` task was not correctly declaring Smithy model
files as inputs, causing it to not regenerate when models changed. This
fixes the path resolution and adds an existence check for the input
files.
## Problem
When running `./gradlew codegen-server-test:assemble`, the task would
not regenerate the server code when Smithy model files were modified
because the Gradle task inputs were not properly declared.
## Solution
- Fixed path resolution from `rootProject.projectDir.resolve(it)` to
`project.projectDir.resolve(it)` since import paths are relative to the
project directory
- Added existence check to only register files as inputs if they
actually exist
- Updated comment to explain what the code does
## Testing
- Verified that the task now properly detects changes to Smithy model
files
- Confirmed that `./gradlew codegen-server-test:assemble` regenerates
code when models change1 parent 4ac79e6 commit bab3bbb
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
241 | 246 | | |
242 | 247 | | |
243 | 248 | | |
| |||
0 commit comments