Yes, the easiest way to do a simple test is to use the org.gradle.testfixtures.ProjectBuilder class.
Project project = ProjectBuilder.builder().build()
project.apply plugin: 'dependencyAnalysis'
project.apply plugin: 'java'
assertTrue(project.tasks.analyze instanceof AnalyzeTask)
However, this can only be checked before the configuration phase. Therefore, to check the execution phase, this will not work.
API- , , Opal, , . https://github.com/nebula-plugins/nebula-test