SHARE
TWEET

jameslorenzen

a guest Aug 10th, 2008 1,200 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import org.codehaus.groovy.grails.commons.GrailsClassUtils as GCU
  2.  
  3. /**
  4.  * This script installs the javascript library extjs available from
  5.  * http://www.extjs.com. Requires the zip file be present in the
  6.  * plugins directory. After running grails install-extjs, the library
  7.  * will be copied to the webapp/scripts/ext folder.
  8.  */
  9. grailsHome = Ant.project.properties."environment.GRAILS_HOME"
  10. basedir = 5.0%2Fdocs%2Fapi%2F">System.getProperty("base.dir")
  11. extjsFile = "${basedir}/plugins/ext-2.2.zip"
  12. jsDir = "${basedir}/web-app/js"
  13. extDir = "${jsDir}/ext"
  14. props = null
  15.  
  16. includeTargets << new 5.0%2Fdocs%2Fapi%2F">File ( "${grailsHome}/scripts/Init.groovy" )
  17.  
  18. target('default': "The description of the script goes here!") {
  19.     depends(setup)
  20.     clean()
  21.     install()
  22. }
  23.  
  24. target(setup: "Sets up access to the Grails Config properites script") {
  25.     Ant.property(file: "${basedir}/grails-app/conf/Config.groovy")
  26.     props = Ant.antProject.properties
  27. }
  28.  
  29. target(clean: "Removes any previous versions") {
  30.     Ant.delete(dir: "${extDir}")
  31. }
  32.  
  33. target(install: "Installs the latest version of extjs into the scripts folder") {
  34.     Ant.unzip(src: "${extjsFile}", dest: "$jsDir")
  35.     Ant.move(file: "${jsDir}/ext-2.2", tofile: "${extDir}")
  36.     Ant.delete(dir: "${extDir}/docs")
  37.     Ant.delete(dir: "${extDir}/examples")
  38.     Ant.delete(dir: "${extDir}/source")
  39. }
RAW Paste Data
Top