Unable to instantiate annotation processor

I’m trying to compile a java annotation processor.

The currently layout of the project is below. My annotation processor is located in src/1 (main project) and I’m trying to compile it in the subprojects.

src/1 ----/src/main/java ---------com.testing.annotation.PropAnnotationProcessor ----/src/test/java ----build.gradle src/2 ----/src/main/java ----/src/test/java ----build.gradle src/3 ----/src/main/java ----/src/test/java ----build.gradle …

I get an error message " error: Could not instantiate an instance of processor ‘com.testing.annotation.PropAnnotationProcessor’ " I’m lost as to where and what is causing this error.

Any thoughts or suggestion is appreciated!

This is src/1 build.gradle

{it.name != 'sample'} ){
 configurations {
   dependencies {
 genProperties project(':')
   def genProperties = "${buildDir.absolutePath}/properties"
  task genProperties(type: JavaCompile) {
 source = sourceSets.main.java
 classpath = configurations.compile + configurations.genProperties
 options.compilerArgs = [
  "-processor", "com.testing.annotation.PropAnnotationProcessor"
 destinationDir = new File(genProperties)
  compileJava {
 dependsOn genProperties