Gradle 5.4.1 -> 7.4.2 publish error

  • I upgraded from version 5.4.1 to 7.4.2 using the command ./gradlew wrapper --gradle-version=7.4.2
  • Consequently, my Jenkins build began failing on the command ./gradlew clean build publish '-Pversion=2.1.117'
  • It looks like something may be pointing to a bad URL. Would be very grateful for any guidance:
Exception in thread "main"
	at java.base/
	at java.base/
	at java.base/
	at org.gradle.wrapper.Download.downloadInternal(
	at org.gradle.wrapper.Install$
	at org.gradle.wrapper.Install$
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(
	at org.gradle.wrapper.Install.createDist(
	at org.gradle.wrapper.WrapperExecutor.execute(
	at org.gradle.wrapper.GradleWrapperMain.main(```

Do you have something in the build that customizes the wrapper task? It appears to have generated an incorrect URL in the file.
should be

I thought maybe you accidentally typed the wrong version in when running the wrapper task, but gradle prevents that:

./gradlew wrapper --gradle-version=7-4-2

FAILURE: Build failed with an exception.

* What went wrong:
'7-4-2' is not a valid Gradle version string (examples: '1.0', '1.0-rc-1')
1 Like