GradleFX @ Belgian Flex Usergroup (live blog)

ActionScript, Air, Flash, Flex Add comments

Yennick Trevels is speaking about GradleFX this evening. The session starts at 19:00 CET. Check back here for updates and feel free to ask questions in the comments. Please use the #beflug hashtag when tweeting about this event.

What is GradleFX

From the website: “GradleFx is a Gradle plugin for building Flex and Actionscript applications. It provides a set of useful tasks that will make building your project a breeze. All the build logic is encapsulated by the plugin and all you need to do is some configuration. Because GradleFx uses the convention-over-configuration principle it has a set of sensible defaults for most configuration properties, so you only need to specify those if you want to deviate from the convention.”

More info: http://gradlefx.github.com/

What is Gradle

From the website: “Gradle is build automation evolved. Gradle can automate the building, testing, publishing, deployment and more of software packages or other types of projects such as generated static websites, generated documentation or indeed anything else.

Gradle combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build. Powered by a Groovy DSL and packed with innovation, Gradle provides a declarative way to describe all kinds of builds through sensible defaults. Gradle is quickly becoming the build system of choice for many open source projects, leading edge enterprises and legacy automation challenges.”

More info: http://gradle.org/

Session notes (live)

19:20 Here we go! About 15 people in the room.

19:25 Yennick explains Gradle before diving into GradleFX. Show of hands of Ant and Maven users. Most have used both. Gradle combines the best of both worlds Yennick states.

Gradle has built-in tasks for compiling and testing etc, but you can create your own tasks as well. Everything is written in Groovy. Gradle uses Configuration Injection instead of configuration inheritance like Maven for subprojects.

19:30 Yennick shows how to create a simple task in Gradle and how you can configure existing tasks. Executing a task: command line > “gradle {taskName}”

19:35 Example of a custom task class in Groovy. You can extend DefaultTask and provide custom task logic.

Default properties in the build scripts allow you to have small build scripts if you use the conventions.

Remote repositories can be used from Ivy and Maven repositories. You can add mavenCentral(), mavenLocal(), or a custom repository in the “repositories” section.

19:40 Gradle has a 3-phase build: initialization, configuration, execution.

You can use project.afterEvaluate to add extra tasks or properties after the configuration is read. This allows you to add certain tasks conditionally, e.g. add package task only if the project is an AIR application.

ant.java allows you to execute Ant code from Gradle. You can use ant.properties to read Ant defined properties.

19:45 Maven support in Gradle: you can locally install artifacts to your Maven repository.

Gradle Wrapper is a shell script that run Gradle even if you don’t have Gradle installed. You can specify the Gradle version to make sure people build your project with the correct Gradle version. Use “gradlew” to execute.

19:50 Now to GradleFX. Adds tasks to compile SWF, SWC and AIR, running unit tests and generating HTML wrappers.

Tasks: clean, compile, package, copyResources, publish, createHtmlWrapper, test

19:55 Setup: specify FLEX_HOME environment variable or set the flexHome convention property.

The GradleFX dependency is org.gradlefx.gradlefx, currently version 0.4.1

20:00 You can also generate AIR descriptor files and certificates in PKCS12 format, a password is required.

FlexUnit support: specify the FLEXUNIT_HOME and the FLASH_PLAYER_EXE environment variable.

20:05 Taking a short break. Demo time when we return.

20:25 Demo time.


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in