Cannot find Plugin [id: 'com.github.johnrengelman.shadow', version: '5.2.0']

大兔子大兔子 提交于 2021-02-19 08:56:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!