How to set/override the property 'inputDirectory' for javacc plugin (plugin: 'ca.coglinc.javacc'))

(abdur.billah) #1

Hello Experts,

I have multiple projects in my application. In one of the projects, I’m using the javacc plugin (apply plugin: ‘ca.coglinc.javacc’) that generates java files from .jj file. The .jj file has been put into the src/main/javacc/ folder of the subproject as required by the plugin. The project builds fine if build.gradle is run from the subproject. However, if I run the main build.gradle, it searches for the .jj file with respect to the location of the main build.gradle file.

Here is the error message:

A problem was found with the configuration of task ‘:bi-metadata-uel:compileJavacc’. > Directory ‘/scratch/abillah/git/bics/bi-modeler-apps/src/main/javacc’ specified for property ‘inputDirectory’ does not exist.

The .jj file is located one level lower in ‘/scratch/abillah/git/bics/bi-modeler-apps/bi-metadata-uel/src/main/javacc’ folder.

I tried by setting the following in the subprojects build script, but that did not help. System.setProperty(“user.dir”, "/scratch/abillah/git/bics/bi-modeler-apps/bi-metadata-uel);

My question is how I can set or override the default value for the property ‘inputDirectory’ for this plugin.