Best way to create Resource Modules
Hello!
As part of my project, we need to have resource modules separate from the final output .swf file.
To summarize, we have one .swf file that contains the source code, and 3 .swf modules that contain the resource files.
Directory structure is:
src/main/actionscript src/main/locale/build.gradle
I want the final output to be:
build/Output.swf build/Output-.swf
where Output.swf has the compiled src code, and the Output- files just contain the resource files.
Right now I have the Output.swf compiled fine, but I am having trouble configuring a new org.gradlefx.tasks.compile.Compile task from scratch to compile the resource files.
More information about resource modules: https://www.adobe.com/devnet/flex/articles/flex-localization-pt2.html
Is this something that gradlefx supports? Or is it something that I could at least hack together? Any advice would be helpful.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by dpeeters on 25 Oct, 2015 11:13 PM
Don't know if gradlefx supports this, but you can always create your own gradle tasks on which the build task depends.
For compiling the resource modules you can use mxmlc as an ant task. Take a look at the following page where I use adt with my own arguments. You can do the same for mxmlc. http://support.gradlefx.org/discussions/questions/3577-how-can-i-bu...
2 Posted by Ed Mitchell on 26 Oct, 2015 04:51 AM
Yeah, I was hoping I wouldn't have to implement an ant task, it's not the end of the world, but something I would've liked to avoid.
Is there not a way to define a task as the type org.gradlefx.tasks.compile.Compile like you can with other gradle tasks like Copy?
Support Staff 3 Posted by Yennick Trevels on 27 Oct, 2015 06:33 PM
In a similar discussion I provided an example on how to create a custom task which calls the mxmlc compiler: http://support.gradlefx.org/discussions/problems/2195-compile-css-t...
4 Posted by Ed Mitchell on 27 Oct, 2015 07:09 PM
Yeah, what I ended up doing is a little bit differently.
I overrode the functionality in the currently existing Compile class like so:
Defined a new class that extends CompilerInstructionsBuilder that does not call addMainClass()
Defined a new class that extends Mxmlc that uses that CompilerInstructionsBuilder
Defined a new class that extends Compile that overrides createDelegate to return the new Mxmlc extended class
Seems to work pretty well, I'd love if this functionality was added to Gradlefx, but for now, this works for me.