Tasks¶
Overview¶
The GradleFx plugin adds the following tasks to your project:
| Task name | Depends on | Description |
|---|---|---|
| clean | n/a | Deletes the build directory |
| compileFlex | copyresources | Creates a swc or swf file from your code. The ‘type’ property defines the type of file |
| package | compile | Packages the generated swf file into an .air package |
| copyresources | n/a | Copies the resources from the source ‘resources’ directory to the build directory |
| copytestresources | n/a | Copies the test resources from the test ‘resources’ directory to the build directory |
| publishFx | n/a | Copies the files from the build directory to the publish directory. |
| createHtmlWrapper | n/a | Creates an HTML wrapper for the project’s swf |
| testFx | copytestresources | Runs the FlexUnit tests |
| asdoc | compile | Creates asdoc documentation for your sources |
| packageMobile | compile | Packages the mobile app for a release version. |
| packageSimulatorMobile | compile | Packages the mobile app for the simulator. |
| installMobile | uninstallMobileApp packageMobile | install app to target device |
| installSimulatorMobile | uninstallSimulatorMobileApp packageSimulatorMobileApp | Installs the app on the simulator. |
| uninstallMobile | Uninstalls the app from the device. | |
| uninstallSimulatorMobile | Uninstalls the app from the simulator. | |
| launchMobile | installMobileApp | Launches the app to a certain device. |
| launchSimulatorMobile | installSimulatorMobileApp | Launches the app on the simulator. |
| launchAdl | compile | Task which launches ADL. |
The Flashbuilder plugin adds the following tasks to your project:
| Task name | Depends on | Description |
|---|---|---|
| flashbuilder | n/a | Creates the Adobe Flash Builder project files |
| flashbuilderClean | n/a | Deletes the Adobe Flash Builder project files |
The Idea plugin adds the following tasks to your project:
| Task name | Depends on | Description |
|---|---|---|
| idea | n/a | Creates the IDEA Intellij project files |
| ideaClean | n/a | Deletes the IDEA Intellij project files |
The Scaffold plugin adds the following tasks to your project:
| Task name | Depends on | Description |
|---|---|---|
| scaffold | n/a | Generates directory structure and main application class |
Adding additional logic¶
Sometimes you may want to add custom logic right after or before a task has been executed. If you want to add some logging before or after the compile task, you can just do this:
- compileFlex.doFirst {
- println “this gets printed before the compile task starts”
}
- compileFlex.doLast {
- println “this gets printed after the compile task has been completed”
}