Skip to content

UpdateGradleWrapper fails for a custom wrapperUri with placeholders #4816

Open
@bmuschko

Description

What version of OpenRewrite are you using?

  • OpenRewrite v8.41.0

How are you running OpenRewrite?

Moderne.io

Is your project a single module or a multi-module project? Single

Can you share your configuration so that we can rule out any configuration issues?

type: specs.openrewrite.org/v1beta/recipe
...
recipeList:
  - org.openrewrite.gradle.UpdateGradleWrapper:
       version: 8.9
       distribution: bin
       wrapperUri: https://services.gradle.org/distributions/gradle-${version}-${distribution}.zip

What is the smallest, simplest way to reproduce the problem?

Run the org.openrewrite.gradle.UpdateGradleWrapper recipe with the declarative YAML format.

What did you see instead?

An error with a stack trace when executing the recipe.

What is the full stack trace of any errors you encountered?

java.lang.IllegalArgumentException: Illegal character in path at index 50: https://services.gradle.org/distributions/gradle-${version}-${distribution}.zip
  java.base/java.net.URI.create(URI.java:906)
  org.openrewrite.gradle.UpdateGradleWrapper.getGradleWrapper(UpdateGradleWrapper.java:139)
  ...

Are you interested in [contributing a fix to OpenRewrite]

Yes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions