Gradle does not find the Shadow (fat jar) plugin
Gradle stops during configuration because it cannot resolve the plugin id you applied for ShadowShort answer
Gradle looks the plugin up by exact id and version. Shadow is applied with the id com.gradleup.shadow plus a literal version in the plugins block, and it is resolved from the Gradle Plugin Portal. A different id, a missing version, or a settings file that leaves out gradlePluginPortal() all make Gradle report that the plugin was not found.
Fix it fast
1Find out which cause you have
Show the plugin lines in the build file and any pluginManagement block in settings. The id, the version and the repository list are the three things to compare with the causes.
grep -n -i -E 'shadow|pluginManagement|gradlePluginPortal' build.gradle* settings.gradle*2Match what you see, then jump to its fix
- 1
The id in your plugins block differs from com.gradleup.shadow, or the version is not one the portal listsThe id or version in the plugins block is not what the Shadow docs giveFix - 2
settings.gradle(.kts) has a pluginManagement block whose repositories do not include gradlePluginPortal()The Plugin Portal is not among the plugin repositoriesFix - 3
The plugin is applied as id("com.gradleup.shadow") with no version, in a project where it is not already on the classpathThe version is missing or computedFix
- 1
What does the error look like?
Gradle stops during configuration because it cannot resolve the plugin id you applied for ShadowThe shadowJar task does not exist after you apply the plugin
Cause 1 of 3
The id or version in the plugins block is not what the Shadow docs give
1Check
The Shadow getting-started page applies the plugin with id com.gradleup.shadow and a version, next to the java plugin. The Plugin Portal page for that id lists the available versions.
grep -n 'shadow' build.gradle*2Fix
Use the documented id and a version from the portal. The version must be a literal string.
plugins {
java
id("com.gradleup.shadow") version "9.6.1"
}3Verify
Gradle resolves the plugin and lists the shadowJar task.
./gradlew tasks --all | grep -i shadowConfirmed by gradleup.com
Cause 2 of 3
The Plugin Portal is not among the plugin repositories
1Check
By default Gradle searches the Gradle Plugin Portal. A pluginManagement block with repositories replaces that default unless gradlePluginPortal() is listed.
sed -n '1,30p' settings.gradle*2Fix
Add gradlePluginPortal() to the pluginManagement repositories. pluginManagement must be the first block in settings.gradle(.kts).
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}3Verify
Run any task again.
./gradlew helpConfirmed by docs.gradle.org
Cause 3 of 3
The version is missing or computed
1Check
Gradle's plugin documentation says the form without a version is for core plugins or plugins already available to the build script. A plugin that must be resolved needs a version, and the id and version must be constant strings.
grep -rn 'com.gradleup.shadow' --include=*.gradle --include=*.kts .2Fix
Write the version as a literal, or declare it once in settings under pluginManagement plugins and apply the id alone in modules.
// settings.gradle.kts
pluginManagement {
plugins {
id("com.gradleup.shadow") version "9.6.1"
}
}3Verify
Sync again and run the jar task.
./gradlew shadowJarConfirmed by docs.gradle.org
How do I stop it coming back?
- Copy the plugin line from the project's own getting-started page, and take the version from the Plugin Portal.
- Keep one pluginManagement block in settings so every module resolves plugins the same way.
- Pin the version; do not use dynamic version strings.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
Gradle says the plugin id you asked for does not exist in any repository it searched
Gradle Central Plugin Repository (no 'google()' listed)
Gradle searched every repository listed for plugins and none had that id at that version.
3 causes, each with a fixBack end
Android gets HTML instead of JSON from a PHP API
org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject
The response body is not JSON.
2 causes, each with a fixBack end
Gradle runs no Cucumber scenarios from my feature files
Feature files exist under src/test but nothing runs
Cucumber runs on the JUnit Platform, so Gradle must call useJUnitPlatform() and have the cucumber-junit-platform-engine on the test classpath.
4 causes, each with a fixBack end
A Gradle build fails on classes that use Lombok annotations
Error: Annotation processors must be explicitly declared now.
Lombok is two things for Gradle: a compile-time library and an annotation processor.
3 causes, each with a fixBack end
Gradle cannot calculate the javaCompiler for compileJava
Failed to calculate the value of task ':compileJava' property 'javaCompiler'
The build asks for a Java toolchain version that Gradle cannot find on the machine.
2 causes, each with a fixBack end
Gradle cannot find org.codehaus.groovy:groovy for a Groovy 4 version
Could not find org.codehaus.groovy:groovy:4.0.12.
Groovy 4 and newer are published under the group org.apache.groovy.
2 causes, each with a fix