Using G4 & Java11, any reason why I wouldn't b...
# questions
p
Using G4 & Java11, any reason why I wouldn't be seeing a
toCalendar()
method on
Timestamp
(i.e. derived from
java.sql.Date
)?
g
In Groovy 2.5 which is used in Grails 4 the date extensions were pulled out to a separate dependency. Use the docs changing the URL to the version of G4 you are using to look up the Groovy version you are using: https://grails.github.io/legacy-grails-doc/4.0.0/guide/single.html#whatsNew Then go here and find that version for the date libraries: https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-datetime For example, if you are on 4.0.0 in the docs it says it's using groovy 2.5.6 so you would add this dependency to your build: implementation 'org.codehaus.groovygroovy datetime2.5.6' If I were you after you're done migrating to 4 I would upgrade to 5 which shouldn't be very difficult, and then be ready to upgrade whenever Grails 7 comes out.
p
Fantastic! Thanks!
Hm. I'm using Grails 4.1.4 == Groovy 2.5.14 == groovy-datetime:2.5.14 which I've tried adding to both the elasticsearch-plugin .jar build as well as my project build and groovy-datetime dependency is showing as loaded but it doesn't seem to be plugging that
toCalendar()
method. Doesn't appear to be having any runtime effect at all...