First you need to specify the FlexUnit dependencies. You can download the required FlexUnit libraries from their site and then deploy them on your repository (recommended) or use file-based dependencies. Once you’ve done that you have to define them as dependencies in your build file.

Then you’ll need to specify the location of the Flash Player executable. GradleFx uses the FLASH_PLAYER_EXE environment variable by convention which should contain the path to the executable. If you don’t want to use this environment variable you can override this with the ‘flexUnit.command’ property. You can download the executable from here (these links may get out of date, look for the Flash Player standalone/projector builds on the Adobe site):

In case you want to execute a task which depends on the test task, but you don’t want to execute the tests, then you can skip the test execution by excluding the test task with the ‘-x test’ parameter. Like this: