Re: Remembering imports between script invocations

2018-10-31 Thread David Ekholm
script.class, false) > metaClass.include = { String name -> > ImportCustomizer includes = new ImportCustomizer() > includes.addStarImports(name) > configuration.addCompilationCustomizers(includes) > "Imported $name" >

Re: Remembering imports between script invocations

2018-02-09 Thread David Ekholm
Who can I contact? Regards /David > On 8 Feb 2018, at 23:25, <eric.mil...@thomsonreuters.com> > <eric.mil...@thomsonreuters.com> wrote: > > Sounds more like the Groovy Shell or Groovy Console. Not too sure myself how > the javax.script stuff is tied in. > &

Re: Remembering imports between script invocations

2018-02-08 Thread David Ekholm
9. JShell unfortunately cannot run embedded via the javax.script API :-( Regards /David > On 8 Feb 2018, at 21:34, eric.mil...@thomsonreuters.com wrote: > > You can add all the imports you want to your compiler configuration and they > will be consistently available for all scripts. &g

Remembering imports between script invocations

2018-02-08 Thread David Ekholm
We're considering supporting Groovy as an additional scripting language to our web gallery software jAlbum (http://jalbum.net ), but one aspect bugs me: It doesn't seem like import statements are remembered between script invocations. This makes it far harder to use Groovy