- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试编译名为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 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
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()
}
最佳答案
提到的插件org.ajoberstar.grgit
被应用了两次。第一次通过新的plugins
块应用它,第二次通过旧的apply plugin:
方法应用。只需删除apply plugin: "org.ajoberstar.grgit"
行,该错误应消失。
要通过旧的apply plugin:
方法应用插件,需要从buildscript
块内的任意存储库解析插件包。这与通过普通的repositories
和dependencies
块解决项目依赖项的方式相同。
新的plugins
块直接从Gradle plugin portal解析插件,并在同一步骤中应用它们。
我猜想将如何应用于插件的方式已更改为较新的方式,但是未删除旧方法。在现有设置中,该插件可能已从本地Gradle缓存中解析出来,但是在新设置中找不到该插件。
关于gradle - 找不到ID为 'org.ajoberstar.grgit'的插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57722140/
尝试执行grgit任务时,Gradle会引发NoClassDefFoundError。 build.gradle的开始: buildscript { repositories {
我们正在使用grgit更新github中的文件。 def grgit = Grgit.open(dir: repoDir) grgit.add(patterns: ['src'], updat
我正在尝试使用grgit添加git标记,提交并将文件推送到远程分支。这是我想做的事情: //Task to push updated build.info to remote branch task
我正在尝试使用grdale grgit从git checkout 一个远程分支。这是我的代码 def gitRepo = Grgit.open(dir: '.') task checkoutBranc
如何让 gradle 克隆一个 git 存储库(到当前存储库的子存储库)并将其构建为子项目? 目前我有以下内容: settings.gradle: include 'contrib/dependenc
我有一个将标签推送到存储库的任务: task tagRepo << { def gitTagName = 'a11' def gitTagMessage = 'This s a new tag' de
我有一个运行脚本的 gradle 项目,在其中的某个位置,我需要克隆一个 git 存储库。我之前用 svn 运行过它,但是我将我们公司的 SCM 更改为 gitlab,并且我需要更改代码,以便它现在可
我是一名优秀的程序员,十分优秀!