-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CompilerConfiguration.targetDirectory is null in AST tranformation #575
Comments
Also, you can set the target directory by setting a system property. This is an excerpt from CompilerConfiguration's default constructor. String target = System.getProperty("groovy.target.directory");
if (target != null) {
setTargetDirectory(target);
} |
@eric-milles interesting, we are actually using a custom system property to work around the issue. As far as what other properties to set, I’m only really interested in target directory at the moment. Thanks for looking into this! |
Do you need this property for building from Eclipse (UI) or Maven (CLI)? I have the Eclipse case figured out, but the CLI mode is a bit different. |
@eric-milles I'm using a Maven build. |
Can you give this a try? groovy-eclipse-batch-2.4.15-SNAPSHOT.zip |
@eric-milles Yep, this seems work! 👍 |
Next release of the batch compiler will contain this fix. Hopefully the snapshot will be enough for you in the interim. |
I'm doing some work with an AST transformation, and it appears that when using the Groovy-Eclipse compiler, the
targetDirectory
property is not being set correctly when the transform is executed. The property is set correctly when the same transform is executed from a Gradle project. The sample project/s attached demonstrates the issue.Sample project: https://github.com/ZacharyKlein/groovy-ast-demo
AST lib (JAR included in the above project): https://github.com/ZacharyKlein/groovy-ast-lib
The text was updated successfully, but these errors were encountered: