Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.4.0-beta-3
-
None
Description
I have attached a simple project which includes the following:
src/main/groovy/demo/Demo.groovy
package demo @groovy.transform.CompileStatic class Demo { @groovy.transform.CompileDynamic def someMethod() { } }
src/main/groovy/demo/JavaCode.java
package demo; public class JavaCode { Demo demo; }
When I attempt to build the project I get the following error:
$ ./gradlew compileGroovy :compileJava UP-TO-DATE :compileGroovy /Users/jeff/t/compiledynamicproblem/build/tmp/groovy-java-stubs/demo/Demo.java:19: error: incompatible types @groovy.transform.CompileDynamic() public java.lang.Object someMethod() { return null;} ^ required: Annotation found: CompileDynamic 1 error startup failed: Compilation failed; see the compiler error output for details. 1 error :compileGroovy FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileGroovy'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 4.401 secs compiledynamicproblem master $
Attachments
Attachments
Issue Links
- is related to
-
GROOVY-7056 AnnotationCollector unusable in external jar when used in stub generation
- Closed