I have one simple application "Client" that uses some annotation, within it I am including the .jar for the annotation processor that I wrote, should write java class using JavaPoet to the console. The following are the configuration for build.gradle I did in the "Client" app:
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile fileTree(dir: 'libs', include: 'AnnotationProcessor-1.0-SNAPSHOT.jar')
annotationProcessor fileTree(dir: 'libs', include: 'AnnotationProcessor-1.0-SNAPSHOT.jar')
compile group: 'com.squareup', name: 'javapoet', version: '1.13.0'
}
I have enabled the annotation processor in the project and given the fully qualified path to this annotation processor also. However, when I do a gradle build, the annotation processor runs and I get:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> java.lang.NoClassDefFoundError: com/squareup/javapoet/MethodSpec
Not sure what could I be doing wrong here.