# PluginResolutionException: Plugin [id: 'com.github.johnrengelman.shadow', version: '8.1.1'] was not found in any of the following sources: Gradle Core Plugins, Plugin Repositories (could not resolve plugin artifact 'com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:8.1.1')

- **ID:** `java/gradle-plugin-not-found`
- **Domain:** java
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The Gradle plugin is not declared in the pluginManagement block or the plugin repository is missing.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 8+ | active | — | — |

## Workarounds

1. **Add the Gradle Plugin Portal to pluginManagement repositories** (95% success)
   ```
   pluginManagement { repositories { gradlePluginPortal() mavenCentral() } }
   ```
2. **Declare the plugin directly in build.gradle with correct version** (90% success)
   ```
   plugins { id 'com.github.johnrengelman.shadow' version '8.1.1' }
   ```

## Dead Ends

- **Adding the plugin to buildscript dependencies without using pluginManagement** — Gradle 8+ requires plugins to be resolved via pluginManagement or direct plugin block with repository. (80% fail)
- **Using an older version of the plugin that is not compatible with Gradle 8** — Version incompatibility leads to resolution failure. (75% fail)
