1

通过我在 intellij 中的 build.gradle 文件创建的 flex 应用程序模块是 java 模块,而不是 flash 模块。

//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')
}

这是一个多项目 gradle 应用程序

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

flexApp build.gradle 中的compileFlex 是从javaApp build.gradle 调用的。java 模块创建得很好,没有问题。

4

0 回答 0