Closed Zemedk closed 5 months ago
Hi,
one option that works well is to split your Gradle project into 2 modules:
app
module using Android Gradle pluginlib
module using java-library
plugin
You then keep your .jj files in lib
and use the standard setup of the JavaCC plugin there. In app
you just need to declare dependency on lib
, something like
dependencies {
api project(':lib')
}
That way you can benefit from the automatic configuration of task dependencies and generated source location provided by this project. Advantage of this approach is that your lib
module is not dependent on Android runtime and you can e.g. run tests for it more easily.
It should be also straightforward to use JavaCC without splitting into modules, you just have to make sure that
compileJavacc
Let me know if this helps.
Hi, I want to use JavaCC in Android studio. but I don't master gradle. I applied what is written here but I couldn't get it to work. InputDirectory, OutputDirectory didn't work.