@@ -389,35 +389,36 @@ target(classpath:"Sets the Grails classpath") {
389389 setClasspath()
390390}
391391
392- void setClasspath () {
393- if (classpathSet) return
394-
395- def grailsDir = resolveResources(" file:${ basedir} /grails-app/*" )
396- def pluginLibs = resolveResources(" file:${ basedir} /plugins/*/lib" )
397-
398- Ant . path(id :" grails.classpath" ) {
392+ grailsClasspath = { pluginLibs , grailsDir ->
399393 pathelement(location :" ${ classesDir.absolutePath} " )
400394 pathelement(location :" ${ basedir} " )
401395 pathelement(location :" ${ basedir} /test/unit" )
402- pathelement(location :" ${ basedir} /test/integration" )
396+ pathelement(location :" ${ basedir} /test/integration" )
403397 pathelement(location :" ${ basedir} /web-app" )
404398 pathelement(location :" ${ basedir} /web-app/WEB-INF" )
405399 pathelement(location :" ${ basedir} /web-app/WEB-INF/classes" )
406- for (pluginLib in pluginLibs) {
400+ for (pluginLib in pluginLibs) {
407401 fileset(dir :pluginLib. file. absolutePath)
408402 }
409403 if (new File (" ${ basedir} /web-app/WEB-INF/lib" ). exists()) {
410404 fileset(dir :" ${ basedir} /web-app/WEB-INF/lib" )
411405 }
412406 fileset(dir :" ${ grailsHome} /lib" )
413- fileset(dir :" ${ grailsHome} /dist" )
407+ fileset(dir :" ${ grailsHome} /dist" )
414408 if (new File (" ${ basedir} /lib" ). exists()) {
415409 fileset(dir :" ${ basedir} /lib" )
416410 }
417411 for (d in grailsDir) {
418412 pathelement(location :" ${ d.file.absolutePath} " )
419413 }
420- }
414+ }
415+ void setClasspath () {
416+ if (classpathSet) return
417+
418+ def grailsDir = resolveResources(" file:${ basedir} /grails-app/*" )
419+ def pluginLibs = resolveResources(" file:${ basedir} /plugins/*/lib" )
420+
421+ Ant . path(id :" grails.classpath" ,grailsClasspath. curry(pluginLibs, grailsDir))
421422 StringBuffer cpath = new StringBuffer (" " )
422423
423424 def jarFiles = getJarFiles()
0 commit comments