You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 change
0 commit comments