Dear Gradle experts,
I tried to test my custom plugin on Java:
@Test(groups = “upload”)
public void testUploadGradlePlugin() {
Project project = ProjectBuilder.builder().build();
project.getPluginManager().apply(TestIQPlugin.class); //TestIQPlugin is the custom plugin class name
UploadTask uploadTask = project.getTasks().create("testiqUploadTaskTest", UploadTask.class);
uploadTask.processUpload();
}
It compiles fine but runtime hit exception:
Exception in thread “main” java.lang.NoClassDefFoundError: net/rubygrapefruit/platform/NativeIntegrationUnavailableException
at org.gradle.testfixtures.internal.ProjectBuilderImpl.createProject(ProjectBuilderImpl.java:74)
at org.gradle.testfixtures.ProjectBuilder.build(ProjectBuilder.java:99)
By the way, I executed the code from Java’s main method. I appreciate any kind of help.