Corey Frenette
03/24/2025, 2:11 PM.java
files are written to build/generated/javacc
. I have the following in my build script:
sourceSets {
main {
java {
srcDirs += "${buildDir}/generated/jjtree"
srcDirs += "${buildDir}/generated/javacc"
}
}
}
The directories get added to my main module (screenshots 1/2). I can run the main
method from the generated SkritParser
(screenshot 3). However, I can't reference the generated classes from my main code (screenshot 4). If I press ctrl+space
3 times, intellij finds the class in its dropdown, but it won't compile via intellij or by running gradlew build
.
I'm using gradle 8.12 and intellij 2024.3.1.1
Code: https://github.com/LordMonoxide/opensiege/compare/main.skritVampire
03/24/2025, 9:11 PMsrcDir
. That was all source consumers have those files as sources and also the necessary task dependency automatically implicitly so that the files are generated when necessary.