Gradle 找不到id为“org.ajoberstar.grgit”的插件
我正试图编译一个名为VeinMiner的开源minecraft mod。 我使用./gradlew build来编译它。 但是失败了,请告诉我原因:Gradle 找不到id为“org.ajoberstar.grgit”的插件,gradle,build.gradle,grgit,Gradle,Build.gradle,Grgit,我正试图编译一个名为VeinMiner的开源minecraft mod。 我使用./gradlew build来编译它。 但是失败了,请告诉我原因: FAILURE: Build failed with an exception. * Where: Build file '/home/xxxx/Desktop/VeinMiner/build.gradle' line: 26 * What went wrong: A problem occurred evaluating root proje
FAILURE: Build failed with an exception.
* Where:
Build file '/home/xxxx/Desktop/VeinMiner/build.gradle' line: 26
* What went wrong:
A problem occurred evaluating root project 'VeinMiner'.
> Plugin with id 'org.ajoberstar.grgit' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 14.778 secs
我已经尝试git再次克隆它或在sudo中运行它。
然而,这两种方法都不起作用
此构建渐变如下所示:
它太长了,所以我选择了其中的一部分
我希望建造成功。有人遇到过这种情况吗?提到的插件org.ajoberstar.grgit应用了两次。第一次通过新的plugins块应用,第二次通过旧的apply-plugin:方法应用。只需删除apply plugin:org.ajoberstar.grgit行,错误就会消失
要通过旧的apply plugin:方法应用插件,需要从buildscript块内的任意存储库解析插件包。这与通过普通存储库和依赖项块解析项目依赖项的方式相同
新插件块直接解析来自的插件,并在同一步骤中应用它们
我猜应用于插件的方式已经改成了新的,但是旧方法并没有被删除。在现有设置中,该插件可能已从本地Gradle缓存中解析,但在新设置中找不到该插件。上述插件org.ajoberstar.grgit应用了两次。第一次通过新的plugins块应用,第二次通过旧的apply-plugin:方法应用。只需删除apply plugin:org.ajoberstar.grgit行,错误就会消失
要通过旧的apply plugin:方法应用插件,需要从buildscript块内的任意存储库解析插件包。这与通过普通存储库和依赖项块解析项目依赖项的方式相同
新插件块直接解析来自的插件,并在同一步骤中应用它们
我猜应用于插件的方式已经改成了新的,但是旧方法并没有被删除。在现有设置中,该插件可能已从本地Gradle缓存解析,但在新设置中找不到
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
plugins {
id 'com.matthewprenger.cursegradle' version '1.0.7'
id 'org.ajoberstar.grgit' version '1.3.2'
}
apply plugin: 'forge'
apply plugin: 'maven'
apply plugin: "org.ajoberstar.grgit"
apply plugin: "com.matthewprenger.cursegradle"
ext.git = grgit.open(file('.'))
ext {
configFile = file "build.properties"
revision = git.head().abbreviatedId
depth = git.log().size()
}