SlideShare a Scribd company logo
1 of 35
GradleFx
Flex Build Tool
By Yennick Trevels & Steven Dick
Yennick Trevels
iDA MediaFoundry
Java & Flex


                   @SlevinBE




                        Free Time
                         Programming
                              Reading
                              Gaming
Gradle
An introduction
Features
Convention over Configuration

Gradle
Multi-project support
Dependency Management
Groovy scripting
Source file change detection
Gradle
Example
subprojects {
  apply plugin: 'gradlefx'

    version = '1.0-SNAPSHOT'

    repositories {
      mavenCentral()
      mavenRepo name: 'yoolab-releases', url: "http://projects.yoolab.org/maven/content/repositories/releases"
      mavenRepo name: 'yoolab-snapshots', url: "http://projects.yoolab.org/maven/content/repositories/snapshots"
    }

    dependencies {
      external group: 'org.springextensions.actionscript', name: 'spring-actionscript-core', version: '1.2-SNAPSHOT', ext: 'swc'
      external group: 'org.as3commons', name: 'as3commons-collections', version: '1.1', ext: 'swc'
      external group: 'org.as3commons', name: 'as3commons-lang', version: ‘0.3.2', ext: 'swc'


        external group: 'org.graniteds', name: 'granite-swc', version: '2.2.0.SP1', ext: 'swc'
        external group: 'org.graniteds', name: 'granite-essentials-swc', version: ‘2.2.0.SP1', ext: 'swc'
    }
}
Gradle
Projects
One or more projects per build
One or more tasks per project
One build.gradle file per project
Gradle
Subprojects
Project structure




Settings file (settings.gradle)
    include 'client', 'domain', 'util', 'assets‘


Configuration Injection
subprojects {
                 apply plugin: 'gradlefx'
                 version = '1.0-SNAPSHOT'
                 repositories {
                                 mavenCentral()
                 }
}
Gradle
Tasks
Block of code that defines part of a build

Create a new task
task(showText, dependsOn: ‘projectB:compile’) << ,
              println “I’m executing after the compile task"
}

Configure an existing Task
task(copy, type: Copy) {
               from(file('srcDir'))
               into(buildDir)
}
Gradle
Tasks
Adding behaviour
compile.doLast {
              println “Compilation complete"
}

Executing a task
>gradle showText
Gradle
Methods
Structure build logic

task(showText) << {
              printList(*‘john’, ‘Alfred’, ‘Elise’+)
}

def printList(names) {
               names.each() { name ->
                             println name
               }
}
Gradle
Classes
Defined in
         build script
         rootProjectDir/buildSrc/src/main/
         standalone project
Gradle
Custom task class
class CopyResources extends DefaultTask {

    public CopyResources() {
      description = 'copies the resources to the build directory'
    }

    @TaskAction
    def copyResources() {
      project.resourceDirs.each { resourceDir ->
         def fromLocation = project.file(resourceDir).path
         def toLocation = project.buildDir.path

            logger.info('from ' + fromLocation + ' to ' + toLocation)

            project.copy {
              from fromLocation
              into toLocation
            }
        }
    }
}
Gradle
Convention properties
Properties exposed by plugins
Simple or complex properties
Have a default value (convention)
Can be overridden

Example:
srcDirs = ['src/main/flex']  convention = [‘src/main/actionscript’]
htmlWrapper.title = ‘My html wrapper page title‘  default = project name
Gradle
Repositories

repositories {
    mavenCentral()
    mavenLocal()
    mavenRepo name: 'yoolab-releases', url: "http://projects.yoolab.org/maven/content/repositories/releases"
    mavenRepo name: 'yoolab-snapshots', url: "http://projects.yoolab.org/maven/content/repositories/snapshots"
}
Gradle
Dependencies
Libraries/other projects used by a project

Library Dependency
dependencies {
             merged group: 'org.graniteds', name: 'granite-swc', version: graniteds_version, ext: 'swc‘
}

Project Dependency
merged project(':projectname')
Gradle
Configurations
Bundles a set of dependencies
Varies between plugins

merged group: 'org.graniteds', name: 'granite-swc', version: graniteds_version, ext: 'swc‘



               ‘merged’ configuration
Gradle
Three-phase build
Initialization                       ProjectInstance {
Determines projects for build                    name;
Project instance creation            }




Configuration phase                  ProjectInstance {
Runs build script of every project               name = “my project” ;
Configures project objects
                                     }


Execution phase
Execute the tasks
Gradle
Three-phase build
AfterEvaluate
Runs after project is configured

project.afterEvaluate {
               project.description = project.name + “ is my sample project”
}
Gradle
Ant support
Ant project import
Support for Ivy repositories
Run Ant tasks with Gradle

Example
ant.java(jar: project.flexHome + '/lib/mxmlc.jar',
        dir: project.flexHome + '/frameworks',
        fork: true,
        resultproperty: ‘antResultProperty’,
        outputproperty: ‘antOutputProperty’) ,
                arg(value: ‘-keep-as3-metadata+=Autowired,RemoteClass’)
}

println ant.properties*‘antOutputProperty’+
Gradle
Maven support
Support for Maven repositories
Maven plugin for Java based projects
Gradle
Gradle wrapper
Run Gradle without installing Gradle
batch/shell script

How?
task wrapper(type: Wrapper) {
              gradleVersion = ‘1.0’
}


simple/
  gradlew
  gradlew.bat
  gradle/wrapper/
    gradle-wrapper.jar
    gradle-wrapper.properties
GradleFx
Flex builds just got easier!
Features
SWC, SWF & AIR
GradleFx
Clean & copy resources tasks
Html wrapper generation
FlexUnit support
GradleFx
Tasks
clean
compile
package
copyResources
publish
createHtmlWrapper
test
GradleFx
Setup
Flex SDK
Create FLEX_HOME environment variable  convention
OR
Set flexHome convention property  custom configuration



Apply Plugin
buildscript {
  repositories {
     mavenCentral()
  }

    dependencies {
      classpath group: 'org.gradlefx', name: 'gradlefx', version: '0.4.1'
    }
}

apply plugin: 'gradlefx'
GradleFx
Project type
Defines to which type of archive the sources will be compiled to
Convention property  type
Possible values  ‘swc’, ‘swf’ or ‘air’

Example
type = ‘swc’
GradleFx
Basic conventions
sources  src/main/actionscript (srcDirs property)
resources  src/main/resources (resourceDirs property)
test sources  src/test/actionscript (testDirs property)
test resources  src/test/resources (testResourceDirs property)

mxml main class  Main.mxml in src/main/actionscript/ (mainClass property)
build directory  build (project.buildDir property)
GradleFx
Some advanced properties
Compiler options
additionalCompilerOptions property
One item per compiler option
            additionalCompilerOptions = [
              '-use-network=true',
              '-locale=en_US',
              '-keep-as3-metadata+=Autowired,RemoteClass‘
            ]

JVM options
jvmArguments property
            jvmArguments = ['-Xmx1024m','-Xms512m']
GradleFx
Dependency management
Configurations
Merged (-compiler.library-path)
Internal (-compiler.include-libraries)
External (-compiler.external-library-path)
Rsl (-runtime-shared-library-path)
Test

Example
external group: 'org.as3commons', name: 'as3commons-eventbus', version: '1.1', ext: 'swc'
merged group: 'org.graniteds', name: 'granite-swc', version: '2.2.0.SP1', ext: 'swc'
GradleFx
AIR project required steps
Create AIR descriptor file
Convention
             "/src/main/actionscript/$,project.name-.xml“
Custom value
             air.applicationDescriptor: "/src/main/flex/airdescriptor.xml“


Certificate
Needed to sign the AIR package
PKCS12 format
Password required

Convention
             "$,project.name-.p12“
Custom value
             air.keystore: "certificate.p12“
             air.storepass = "mypassword"
GradleFx
FlexUnit required steps
Specify FlexUnit home
Convention
             FLEXUNIT_HOME environment variable
Custom value
             flexUnit.home = 'c:/flexunit/4.1'


Specify Flash Player executable
Convention
             FLASH_PLAYER_EXE environment variable
Custom value
             flexunit.command = ‘c:/flashplayer/flashplayer_10.exe’


Specify FlexUnit ant task jar name
Located in FlexUnit home directory
Custom value
             flexUnit.antTasksJar = 'flexUnitTasks-4.1.0-8.jar'
GradleFx
FlexUnit required steps
Specify FlexUnit dependencies
dependencies {
  test files( "${flexUnit.home}/flexunit-4.1.0-8-flex_4.1.0.16076.swc",
              "${flexUnit.home}/flexunit-uilistener-4.1.0-8-4.1.0.16076.swc",
              "${flexUnit.home}/flexunit-cilistener-4.1.0-8-4.1.0.16076.swc“)
}

Specify testRunner class
testClass = 'MyTestRunner.mxml'
GradleFx


DEMO
GradleFx
What’s to come?
IDEA and Eclipse project generation support
AS3Doc generation
Flex SDK maven artifact support?
GradleFx
Where to go next
GradleFx site: https://github.com/GradleFx/GradleFx
Source: https://github.com/GradleFx/GradleFx
Documentation: https://github.com/GradleFx/GradleFx/wiki
Examples: https://github.com/GradleFx/GradleFx-Examples
Help & Support: http://gradlefx.tenderapp.com/home
Bug tracker: https://github.com/GradleFx/GradleFx/issues
Changelog: https://github.com/GradleFx/GradleFx/blob/master/CHANGELOG.textile

More Related Content

What's hot

In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleSkills Matter
 
Sbt Concepts - Tips, Tricks, Sandbox, ... 02/2013
Sbt Concepts - Tips, Tricks, Sandbox, ... 02/2013Sbt Concepts - Tips, Tricks, Sandbox, ... 02/2013
Sbt Concepts - Tips, Tricks, Sandbox, ... 02/2013Roland Tritsch
 
Basic Gradle Plugin Writing
Basic Gradle Plugin WritingBasic Gradle Plugin Writing
Basic Gradle Plugin WritingSchalk Cronjé
 
Ship your Scala code often and easy with Docker
Ship your Scala code often and easy with DockerShip your Scala code often and easy with Docker
Ship your Scala code often and easy with DockerMarcus Lönnberg
 
Idiomatic gradle plugin writing
Idiomatic gradle plugin writingIdiomatic gradle plugin writing
Idiomatic gradle plugin writingSchalk Cronjé
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingSchalk Cronjé
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksMike Hugo
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuVMware Tanzu
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingSchalk Cronjé
 
Custom deployments with sbt-native-packager
Custom deployments with sbt-native-packagerCustom deployments with sbt-native-packager
Custom deployments with sbt-native-packagerGaryCoady
 
Continous delivery with sbt
Continous delivery with sbtContinous delivery with sbt
Continous delivery with sbtWojciech Pituła
 

What's hot (19)

In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
Spring4 whats up doc?
Spring4 whats up doc?Spring4 whats up doc?
Spring4 whats up doc?
 
SBT Crash Course
SBT Crash CourseSBT Crash Course
SBT Crash Course
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020
 
Sbt Concepts - Tips, Tricks, Sandbox, ... 02/2013
Sbt Concepts - Tips, Tricks, Sandbox, ... 02/2013Sbt Concepts - Tips, Tricks, Sandbox, ... 02/2013
Sbt Concepts - Tips, Tricks, Sandbox, ... 02/2013
 
SBT Concepts, part 2
SBT Concepts, part 2SBT Concepts, part 2
SBT Concepts, part 2
 
Basic Gradle Plugin Writing
Basic Gradle Plugin WritingBasic Gradle Plugin Writing
Basic Gradle Plugin Writing
 
Jenkins' shared libraries in action
Jenkins' shared libraries in actionJenkins' shared libraries in action
Jenkins' shared libraries in action
 
Ship your Scala code often and easy with Docker
Ship your Scala code often and easy with DockerShip your Scala code often and easy with Docker
Ship your Scala code often and easy with Docker
 
Simple Build Tool
Simple Build ToolSimple Build Tool
Simple Build Tool
 
Idiomatic gradle plugin writing
Idiomatic gradle plugin writingIdiomatic gradle plugin writing
Idiomatic gradle plugin writing
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin Writing
 
Everything as a code
Everything as a codeEverything as a code
Everything as a code
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And Tricks
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFu
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin Writing
 
Custom deployments with sbt-native-packager
Custom deployments with sbt-native-packagerCustom deployments with sbt-native-packager
Custom deployments with sbt-native-packager
 
Continous delivery with sbt
Continous delivery with sbtContinous delivery with sbt
Continous delivery with sbt
 

Similar to GradleFX

Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Tino Isnich
 
Gradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting forGradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting forCorneil du Plessis
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with GradleRyan Cuprak
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with GradleRyan Cuprak
 
Improving your Gradle builds
Improving your Gradle buildsImproving your Gradle builds
Improving your Gradle buildsPeter Ledbrook
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingSchalk Cronjé
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 
Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Andres Almiray
 
Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016Alvaro Sanchez-Mariscal
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolvedBhagwat Kumar
 
Making the most of your gradle build - Greach 2017
Making the most of your gradle build - Greach 2017Making the most of your gradle build - Greach 2017
Making the most of your gradle build - Greach 2017Andres Almiray
 
Gradle plugin, take control of the build
Gradle plugin, take control of the buildGradle plugin, take control of the build
Gradle plugin, take control of the buildEyal Lezmy
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StoryKon Soulianidis
 
Anatomy of a Gradle plugin
Anatomy of a Gradle pluginAnatomy of a Gradle plugin
Anatomy of a Gradle pluginDmytro Zaitsev
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Roberto Franchini
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache AntShih-Hsiang Lin
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 

Similar to GradleFX (20)

Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01
 
Gradle
GradleGradle
Gradle
 
Gradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting forGradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting for
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Improving your Gradle builds
Improving your Gradle buildsImproving your Gradle builds
Improving your Gradle builds
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin Writing
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
OpenCms Days 2012 - Developing OpenCms with Gradle
OpenCms Days 2012 - Developing OpenCms with GradleOpenCms Days 2012 - Developing OpenCms with Gradle
OpenCms Days 2012 - Developing OpenCms with Gradle
 
Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017
 
Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
 
Making the most of your gradle build - Greach 2017
Making the most of your gradle build - Greach 2017Making the most of your gradle build - Greach 2017
Making the most of your gradle build - Greach 2017
 
Gradle plugin, take control of the build
Gradle plugin, take control of the buildGradle plugin, take control of the build
Gradle plugin, take control of the build
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
 
Dart Workshop
Dart WorkshopDart Workshop
Dart Workshop
 
Anatomy of a Gradle plugin
Anatomy of a Gradle pluginAnatomy of a Gradle plugin
Anatomy of a Gradle plugin
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 

More from Christophe Herreman

More from Christophe Herreman (7)

De kathedraal en de bazaar
De kathedraal en de bazaarDe kathedraal en de bazaar
De kathedraal en de bazaar
 
Stuff you didn't know about action script
Stuff you didn't know about action scriptStuff you didn't know about action script
Stuff you didn't know about action script
 
How to build an AOP framework in ActionScript
How to build an AOP framework in ActionScriptHow to build an AOP framework in ActionScript
How to build an AOP framework in ActionScript
 
AS3Commons Introduction
AS3Commons IntroductionAS3Commons Introduction
AS3Commons Introduction
 
Spring Actionscript at Devoxx
Spring Actionscript at DevoxxSpring Actionscript at Devoxx
Spring Actionscript at Devoxx
 
Spring ActionScript
Spring ActionScriptSpring ActionScript
Spring ActionScript
 
The Prana IoC Container
The Prana IoC ContainerThe Prana IoC Container
The Prana IoC Container
 

Recently uploaded

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

GradleFX

  • 1. GradleFx Flex Build Tool By Yennick Trevels & Steven Dick
  • 2. Yennick Trevels iDA MediaFoundry Java & Flex @SlevinBE Free Time Programming Reading Gaming
  • 4. Features Convention over Configuration Gradle Multi-project support Dependency Management Groovy scripting Source file change detection
  • 5. Gradle Example subprojects { apply plugin: 'gradlefx' version = '1.0-SNAPSHOT' repositories { mavenCentral() mavenRepo name: 'yoolab-releases', url: "http://projects.yoolab.org/maven/content/repositories/releases" mavenRepo name: 'yoolab-snapshots', url: "http://projects.yoolab.org/maven/content/repositories/snapshots" } dependencies { external group: 'org.springextensions.actionscript', name: 'spring-actionscript-core', version: '1.2-SNAPSHOT', ext: 'swc' external group: 'org.as3commons', name: 'as3commons-collections', version: '1.1', ext: 'swc' external group: 'org.as3commons', name: 'as3commons-lang', version: ‘0.3.2', ext: 'swc' external group: 'org.graniteds', name: 'granite-swc', version: '2.2.0.SP1', ext: 'swc' external group: 'org.graniteds', name: 'granite-essentials-swc', version: ‘2.2.0.SP1', ext: 'swc' } }
  • 6. Gradle Projects One or more projects per build One or more tasks per project One build.gradle file per project
  • 7. Gradle Subprojects Project structure Settings file (settings.gradle) include 'client', 'domain', 'util', 'assets‘ Configuration Injection subprojects { apply plugin: 'gradlefx' version = '1.0-SNAPSHOT' repositories { mavenCentral() } }
  • 8. Gradle Tasks Block of code that defines part of a build Create a new task task(showText, dependsOn: ‘projectB:compile’) << , println “I’m executing after the compile task" } Configure an existing Task task(copy, type: Copy) { from(file('srcDir')) into(buildDir) }
  • 9. Gradle Tasks Adding behaviour compile.doLast { println “Compilation complete" } Executing a task >gradle showText
  • 10. Gradle Methods Structure build logic task(showText) << { printList(*‘john’, ‘Alfred’, ‘Elise’+) } def printList(names) { names.each() { name -> println name } }
  • 11. Gradle Classes Defined in build script rootProjectDir/buildSrc/src/main/ standalone project
  • 12. Gradle Custom task class class CopyResources extends DefaultTask { public CopyResources() { description = 'copies the resources to the build directory' } @TaskAction def copyResources() { project.resourceDirs.each { resourceDir -> def fromLocation = project.file(resourceDir).path def toLocation = project.buildDir.path logger.info('from ' + fromLocation + ' to ' + toLocation) project.copy { from fromLocation into toLocation } } } }
  • 13. Gradle Convention properties Properties exposed by plugins Simple or complex properties Have a default value (convention) Can be overridden Example: srcDirs = ['src/main/flex']  convention = [‘src/main/actionscript’] htmlWrapper.title = ‘My html wrapper page title‘  default = project name
  • 14. Gradle Repositories repositories { mavenCentral() mavenLocal() mavenRepo name: 'yoolab-releases', url: "http://projects.yoolab.org/maven/content/repositories/releases" mavenRepo name: 'yoolab-snapshots', url: "http://projects.yoolab.org/maven/content/repositories/snapshots" }
  • 15. Gradle Dependencies Libraries/other projects used by a project Library Dependency dependencies { merged group: 'org.graniteds', name: 'granite-swc', version: graniteds_version, ext: 'swc‘ } Project Dependency merged project(':projectname')
  • 16. Gradle Configurations Bundles a set of dependencies Varies between plugins merged group: 'org.graniteds', name: 'granite-swc', version: graniteds_version, ext: 'swc‘ ‘merged’ configuration
  • 17. Gradle Three-phase build Initialization ProjectInstance { Determines projects for build name; Project instance creation } Configuration phase ProjectInstance { Runs build script of every project name = “my project” ; Configures project objects } Execution phase Execute the tasks
  • 18. Gradle Three-phase build AfterEvaluate Runs after project is configured project.afterEvaluate { project.description = project.name + “ is my sample project” }
  • 19. Gradle Ant support Ant project import Support for Ivy repositories Run Ant tasks with Gradle Example ant.java(jar: project.flexHome + '/lib/mxmlc.jar', dir: project.flexHome + '/frameworks', fork: true, resultproperty: ‘antResultProperty’, outputproperty: ‘antOutputProperty’) , arg(value: ‘-keep-as3-metadata+=Autowired,RemoteClass’) } println ant.properties*‘antOutputProperty’+
  • 20. Gradle Maven support Support for Maven repositories Maven plugin for Java based projects
  • 21. Gradle Gradle wrapper Run Gradle without installing Gradle batch/shell script How? task wrapper(type: Wrapper) { gradleVersion = ‘1.0’ } simple/ gradlew gradlew.bat gradle/wrapper/ gradle-wrapper.jar gradle-wrapper.properties
  • 23. Features SWC, SWF & AIR GradleFx Clean & copy resources tasks Html wrapper generation FlexUnit support
  • 25. GradleFx Setup Flex SDK Create FLEX_HOME environment variable  convention OR Set flexHome convention property  custom configuration Apply Plugin buildscript { repositories { mavenCentral() } dependencies { classpath group: 'org.gradlefx', name: 'gradlefx', version: '0.4.1' } } apply plugin: 'gradlefx'
  • 26. GradleFx Project type Defines to which type of archive the sources will be compiled to Convention property  type Possible values  ‘swc’, ‘swf’ or ‘air’ Example type = ‘swc’
  • 27. GradleFx Basic conventions sources  src/main/actionscript (srcDirs property) resources  src/main/resources (resourceDirs property) test sources  src/test/actionscript (testDirs property) test resources  src/test/resources (testResourceDirs property) mxml main class  Main.mxml in src/main/actionscript/ (mainClass property) build directory  build (project.buildDir property)
  • 28. GradleFx Some advanced properties Compiler options additionalCompilerOptions property One item per compiler option additionalCompilerOptions = [ '-use-network=true', '-locale=en_US', '-keep-as3-metadata+=Autowired,RemoteClass‘ ] JVM options jvmArguments property jvmArguments = ['-Xmx1024m','-Xms512m']
  • 29. GradleFx Dependency management Configurations Merged (-compiler.library-path) Internal (-compiler.include-libraries) External (-compiler.external-library-path) Rsl (-runtime-shared-library-path) Test Example external group: 'org.as3commons', name: 'as3commons-eventbus', version: '1.1', ext: 'swc' merged group: 'org.graniteds', name: 'granite-swc', version: '2.2.0.SP1', ext: 'swc'
  • 30. GradleFx AIR project required steps Create AIR descriptor file Convention "/src/main/actionscript/$,project.name-.xml“ Custom value air.applicationDescriptor: "/src/main/flex/airdescriptor.xml“ Certificate Needed to sign the AIR package PKCS12 format Password required Convention "$,project.name-.p12“ Custom value air.keystore: "certificate.p12“ air.storepass = "mypassword"
  • 31. GradleFx FlexUnit required steps Specify FlexUnit home Convention FLEXUNIT_HOME environment variable Custom value flexUnit.home = 'c:/flexunit/4.1' Specify Flash Player executable Convention FLASH_PLAYER_EXE environment variable Custom value flexunit.command = ‘c:/flashplayer/flashplayer_10.exe’ Specify FlexUnit ant task jar name Located in FlexUnit home directory Custom value flexUnit.antTasksJar = 'flexUnitTasks-4.1.0-8.jar'
  • 32. GradleFx FlexUnit required steps Specify FlexUnit dependencies dependencies { test files( "${flexUnit.home}/flexunit-4.1.0-8-flex_4.1.0.16076.swc", "${flexUnit.home}/flexunit-uilistener-4.1.0-8-4.1.0.16076.swc", "${flexUnit.home}/flexunit-cilistener-4.1.0-8-4.1.0.16076.swc“) } Specify testRunner class testClass = 'MyTestRunner.mxml'
  • 34. GradleFx What’s to come? IDEA and Eclipse project generation support AS3Doc generation Flex SDK maven artifact support?
  • 35. GradleFx Where to go next GradleFx site: https://github.com/GradleFx/GradleFx Source: https://github.com/GradleFx/GradleFx Documentation: https://github.com/GradleFx/GradleFx/wiki Examples: https://github.com/GradleFx/GradleFx-Examples Help & Support: http://gradlefx.tenderapp.com/home Bug tracker: https://github.com/GradleFx/GradleFx/issues Changelog: https://github.com/GradleFx/GradleFx/blob/master/CHANGELOG.textile