Repository: smithy-lang/smithy-rs (language: rust)

Issue:
Unable to build with `./gradlew publishToMavenLocal`
When running ```./gradlew publishToMavenLocal``` I get the following error message:

```
task ':codegen-core:sourcesJar' (type 'Jar').
  - Gradle detected a problem with the following location: '/__w/cicd-playground/cicd-playground/codegen/rust/codegen-core/build/generated/src/main/kotlin'.
    
    Reason: Task ':codegen-core:sourcesJar' uses this output of task ':codegen-core:generateBuildEnvironmentConstants' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':codegen-core:generateBuildEnvironmentConstants' as an input of ':codegen-core:sourcesJar'.
      2. Declare an explicit dependency on ':codegen-core:generateBuildEnvironmentConstants' from ':codegen-core:sourcesJar' using Task#dependsOn.
      3. Declare an explicit dependency on ':codegen-core:generateBuildEnvironmentConstants' from ':codegen-core:sourcesJar' using Task#mustRunAfter.
 ```

Any suggestions on how to resolve this?
I would much rather get `smithy-rs` from MavenCentral instead of building it myself, are there any plans to publish it?

---

`smithy-rs`commit: c7b1038e5f6f62991345e56cdb7bbb09d6d68952

GH actions file:

```yaml
name: smithy build
on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: docker.io/library/amazoncorretto:17-al2023-jdk@sha256:e5f19f4198cf405ccf8269cdae0f91bd077443642fb28835bdfacb7e18651708
    steps:
      - name: Install dependencies
        run: yum install findutils git -y
          
      - uses: actions/checkout@v4
        with:
          submodules: recursive
          
      - name: Build
        run: |
          cd codegen/rust
          ./gradlew publishToMavenLocal --stacktrace
```

Full GH log: 
[smithy_rs-gh-logs.txt](https://github.com/user-attachments/files/18229173/smithy_rs-gh-logs.txt)
 


Discussion / hints:

Fix patch:
diff --git a/codegen-core/build.gradle.kts b/codegen-core/build.gradle.kts
index e300dac4a7..669f2c4505 100644
--- a/codegen-core/build.gradle.kts
+++ b/codegen-core/build.gradle.kts
@@ -186,6 +186,7 @@ val sourcesJar by tasks.creating(Jar::class) {
     group = "publishing"
     description = "Assembles Kotlin sources jar"
     archiveClassifier.set("sources")
+    dependsOn("generateBuildEnvironmentConstants")
     from(sourceSets.getByName("main").allSource)
 }
 


Test patch: