Создать Flash модуль по интеллигент через градл - PullRequest
0 голосов
/ 08 ноября 2018

Модуль приложения flex, созданный с помощью моего файла build.gradle в intellij, является Java-модулем, а не флэш-модулем.

//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

compileFlex в flexApp build.gradle вызывается из javaApp build.gradle. Java-модуль создан без проблем.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...