Hello! We are working on upgrading an old grails p...
# questions
i
Hello! We are working on upgrading an old grails project from 3.3 to 5 (will go to 6 later). We are using the grails async plugin, and have a class like this:
Copy code
import grails.async.DelegateAsync
class AsyncEmailService {
    @DelegateAsync EmailService emailService
}
When trying to run compileGroovy with gradle though, it fails with this error:
Copy code
.../AsyncEmailService.groovy: 4: The return type of grails.async.Promise setProperty(java.lang.String, java.lang.Object) in email.AsyncEmailService is incompatible with void in groovy.lang.GroovyObject
. At [4:1]  @ line 4, column 1.
   class AsyncEmailService {
   ^
Anyone know what could be causing this issue? Happy to provide any other details
Here are the versions in gradle.properties for the project:
Copy code
grailsVersion=5.3.0
grailsGradlePluginVersion=5.2.5
groovyVersion=3.0.11
gorm.version=7.3.2
gradleWrapperVersion=7.2
j
Do you have a method called 'property' on EmailService? There's a test that covers this scenario here: https://github.com/grails/grails-async/blob/6.0.x/grails-async-core/src/test/groovy/grails/async/DelegateAsyncSpec.groovy maybe looking at it as an example will help you?
i
Thanks for the response @jdaugherty. We do not have a method or property named
property
on EmailService 🤔