0 Replies Latest reply on Jul 19, 2011 3:08 PM by Cage Sh

    flex monkey & gradle

    Cage Sh
      Hello all:

       

      Below is the build.gradle I changed from ant, I want to know:1. how to stop the waring of "junit.XMLResultAggregator not found" 2. how can make the file more "gradle" because it is too"ant"

       

      Thanks

       


      ant.FLEX_HOME="C:/airs/flex/frameworks/flex3_sdk"
      def PROJECT_ROOT=projectDir.getAbsolutePath()
      def OUTPUT_ROOT = PROJECT_ROOT+'/deploy'
      def SOURCE_ROOT=PROJECT_ROOT + '/src'
      def LIB_ROOT=PROJECT_ROOT+ '/libs'
      def AUTO_LIB_ROOT=ant.FLEX_HOME+'/frameworks/libs'
      def APP_NAME='calculatortest'
      def REPORT_ROOT=PROJECT_ROOT+'/report'

       


      task compile << {
      ant.java(jar: ant.FLEX_HOME + '/lib/mxmlc.jar',            
                fork: true,            
                failonerror:true) {
                jvmarg(value:"-Xmx512m")  
                arg(value: "-debug=" + "true")
                arg(value: "+flexlib=" + "${ant.FLEX_HOME}/frameworks")
                arg(value: "+configname=" + "air")
                arg(value: "-source-path")
                arg(value: "${SOURCE_ROOT}")
                arg(value: "-file-specs=" + "${SOURCE_ROOT}/${APP_NAME}.mxml")
                arg(value: "-includes=" + "FlexMonkeyTestController")
                arg(value: "-define+=" + "FLEXMONKEY::antRun,true")
                arg(value: "-define+=" + "FLEXMONKEY::snapshotDirectory,'file://${PROJECT_ROOT}/deploy/snapshots'")
                arg(value: "-include-libraries+=" + "${LIB_ROOT}/automation_monkey3.x.swc")  
                arg(value: "-include-libraries+=" + "${LIB_ROOT}/flexunit-4.1.0_RC2-28-flex_3.5.0.12683.swc")
                arg(value: "-include-libraries+=" + "${LIB_ROOT}/flexunit-aircilistener-4.1.0_RC2-28-3.5.0.12683.swc")
                arg(value: "-include-libraries+=" + "${LIB_ROOT}/flexunit-cilistener-4.1.0_RC2-28-3.5.0.12683.swc")
                arg(value: "-include-libraries+=" + "${AUTO_LIB_ROOT}/automation.swc")
                arg(value: "-include-libraries+=" + "${AUTO_LIB_ROOT}/automation_agent.swc")
                arg(value: "-include-libraries+=" + "${AUTO_LIB_ROOT}/automation_dmv.swc")
                arg(value: "-include-libraries+=" + "${AUTO_LIB_ROOT}/automation_flashflexkit.swc")
                arg(value: "-output=" + "${OUTPUT_ROOT}/${APP_NAME}.swf")
                }  
             
      }

       

       

      task test << {

       

      ant.taskdef(resource: 'flexUnitTasks.tasks') {
              classpath {
                  fileset(dir: 'jars', includes: '*.jar')
              }
          }
      ant.flexunit(player:'air',
                   precompiledAppDescriptor:"${OUTPUT_ROOT}/${APP_NAME}-app.xml",
                               toDir:"${REPORT_ROOT}",
                               haltonfailure:false,
                               verbose:true
                   )
                   
      ant.junitreport(todir:"${REPORT_ROOT}"){
                   fileset(dir:"${REPORT_ROOT}",includes:'TEST-*.xml')
                   report(format:'frames',todir:"${REPORT_ROOT}/html")
                   }
      }