groovyimportgparsgroovy-grape

Grape or normal import


Does it make a difference, how to integrate GPars in my projects?
Can I either do

@Grab(group='org.codehaus.gpars', module='gpars', version='1.0.0')

or just (provided I have all the required jars in my build path)

import groovyx.gpars.*

?


Solution

  • It's depending on how you organize your project and what is your build system.

    If it's a plain Groovy script, using a @Grab annotation and import statements together will be working for you. @Grab just tells the system to manage dependencies, and you still need import statements.

    But if it's a bigger project, using Gradle is the better way.