Create Flash module on intellij through gradle

124 Views Asked by At

The flex application module that is created through my build.gradle file in intellij is a java module and not a flash module.

//Define buildscript properties
buildscript {
    //Use the primary maven repo
    repositories {
        mavenCentral()
    }
    //We need the gradlefx plugin to run
    dependencies {
        classpath group: 'org.gradlefx', name: 'gradlefx', version: '1.4.0'
    }
}

apply plugin: 'gradlefx'

flexHome = System.getenv('FLEX_HOME')
type = 'swf'
srcDirs = ['./', '../web_stuff']
resourceDirs = ['/resources']
mainClass = 'Web'
output = 'Web'
playerVersion = '11.1'

//Compile using the config file, this file will be dynamically modified to easily switch between variants
additionalCompilerOptions = ['-load-config=' + """pwd""".execute().text.trim() + '/buildSrc/flex-config.xml', '-target-player=11.1']

//Define our HTML wrapper
htmlWrapper {
    source = '../html-template/index.template.html'
    title = "1.28.00"
    application = "${project.mainClass}"
    swf = "${project.mainClass}"

    file = "${project.mainClass}" + ".html"
    }
}

compileFlex.dependsOn createHtmlWrapper

//Use the primary maven repo
repositories {
    mavenCentral()
}

//We need these libs to compile
dependencies {
    //Our included swc files
    internal fileTree(dir: '../flex_libs', include: '*.swc')
    //Use the tomcat rsls that will be referenced at runtime
    merged fileTree(dir: System.getenv('FLEX_HOME') + '/frameworks/rsls', include: '*.swf')

    flexSDK files('../../../ApacheFlexSDK.zip')
}

It's a multiproject gradle application

rootFolder
    build.gradle
    setting.gradle
    javaApp
        build.gradle
        src
    flexApp
        build.gradle
        src

The compileFlex in flexApp build.gradle is called from the javaApp build.gradle. The java module is created just fine with no issues.

0

There are 0 best solutions below