问题
I'm currently trying to create a simple discord bot. I finished the code and I'm trying to export it through shadow--> shadowJar. I keep getting this error message:
Plugin [id: 'com.github.johnrengelman.shadow', version: '5.2.0'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:5.2.0') Searched in the following repositories: Gradle Central Plugin Repository
I've tried to look up how to fix this, being pretty unsuccessful. I'm very new to this, only having experience with simple Java, like multi-dimensional arrays, classes, objects, etc.
Please help!
Here's my build.gradle:
plugins {
id 'java'
id 'application'
id "com.github.johnrengelman.shadow" version "5.2.0"
}
mainClassName = "Main"
group 'com.mywebsite'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.5.0_329'
}
回答1:
At the time of writing this answer, the shadow plugin's latest version is 2.0.3
.
So I have no idea where you sourced that 5.2.0
from but this is the issue: there is no shadow plugin version 5.2.0
out there.
来源:https://stackoverflow.com/questions/61065293/cannot-find-plugin-id-com-github-johnrengelman-shadow-version-5-2-0