Создать Flash модуль на intellij через gradle
Модуль приложения 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-модуль создан просто отлично, без проблем.