当我尝试执行此测试时:
https://gist.github.com/Frontrider/93c3a4fece9903698345f76fad57c85c
比它说:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\H87620143\AppData\Local\Temp\junit5825415720167959245\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating root project 'junit5825415720167959245'.
> Plugin with id 'com.example.testplugin' not found.
我到处环顾了一下(build.gradle中的某些内容只是尝试不同的内容),我无法使其正常工作。
“com.itsh.gradle.releasenotes.properties”文件在build / pluginDescriptors下生成。
最佳答案
使用gradle testkit,
apply plugin: 'id'
语法不起作用,我必须使用新的插件语法。
plugin{
id 'plugin id'
}
关于testing - Gradle Testkit无法将插件添加到自定义源集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51676455/