Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build with ./gradlew publishToMavenLocal #3949

Open
ShaharNaveh opened this issue Dec 23, 2024 · 0 comments
Open

Unable to build with ./gradlew publishToMavenLocal #3949

ShaharNaveh opened this issue Dec 23, 2024 · 0 comments

Comments

@ShaharNaveh
Copy link

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-rscommit: c7b1038

GH actions file:

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

@ShaharNaveh ShaharNaveh changed the title Unable to build smithy-rs using GH actions Unable to build with ./gradlew publishToMavenLocal Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant