[
https://issues.apache.org/jira/browse/GROOVY-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17895084#comment-17895084
]
Scott edited comment on GROOVY-11513 at 11/3/24 5:10 AM:
---------------------------------------------------------
This is purely an IDE issue as the project builds and runs in Gradle with the
config script added.
I imagine it is using the Groovy Eclipse compiler. It has a setting under
Groovy Compiler for "Path to configscript" where I can put the config script,
but the errors remain if I select the same script. Having to manually use such
a setting, however, would not accomplish the goal of having the java.time.*
import work automatically for all Grails projects and not just a single project.
was (Author: JIRAUSER284944):
This is purely an IDE issue as the project builds and runs in Gradle with the
config script added.
I imagine the Groovy Eclipse compiler. It has a setting under Groovy Compiler
for "Path to configscript" where I can put the config script, but the errors
remain. Having to manually use such a setting, however, would not accomplish
the goal of having the java.time.* import work automatically for all Grails
projects and not just a single project.
> java.time.* should be imported automatically
> --------------------------------------------
>
> Key: GROOVY-11513
> URL: https://issues.apache.org/jira/browse/GROOVY-11513
> Project: Groovy
> Issue Type: Improvement
> Components: Compiler
> Affects Versions: 4.0.23
> Reporter: Scott
> Priority: Major
> Fix For: 4.x
>
>
> if java.time is the recommended way to proceed forward when dealing with
> dates,
> java.time.* should be included automatically similar to how java.util.Date is
> currently available without import.
> The preferred approach would be to make it a global import which would be in
> line with existing Groovy handling of java.util.Date
>
> The least invasive approach would be to make the import only apply if
> groovy-datetime module has been added.
>
> implementation "org.apache.groovy:groovy-datetime"
>
> should automatically import java.time.* to all classes
>
> This provides an easier migration path from Date -> DateTIme
> [https://groovy.apache.org/blog/groovy-dates-and-times-cheat]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)