Possible to add Flexunit dependencies to .actionScriptProperties using flashbuilder plugin
Hello,
First of all, great tool, been working great so far for command line stuff. However the flashbuilder plugin's classpath is still a little incomplete. Anyhow my first question is in the title. Is it possible the same way the gradle eclipse plugins adds configurations (in my case it would be configurations.test). Of course the obvious workaround is to is directly use Flash builder however since the SDK is now a dependency (and not the one supplied by the IDE) why not?
Also I work with a bunch of legacy projects, which don't have
seperate src and resource folders for the main and test AS3 files.
Since the scaffold plugin is not customizable, I'm forced to run
$gradle flashbuilder -x scaffold
yet the default
resource directories are still added to the .actionScriptProperties
despite the fact that they don't exist. Anyhow nothing big, just
was hoping that the flashbuilder plugin was a little more
parametrizable by convention properties.
Best regards,
Nicolas
ps. Oh and I found a couple of bugs regarding the inputs and
outputs of the various gradlefx tasks, for instance with flexUnit
if I change the toDir property, I'm forced to reset the outputs as
such:
def testOutput = "${project.buildDir}/reports"
flexUnit {
player = 'air'
verbose = true
toDir = testOutput
workingDir = "${project.buildDir}"
localTrusted = true
}
project.tasks['test'].outputs.dir(testOutput)
Same thing for the asdoc tag, no biggie but the outputs should probably not be determined post task execution.
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
Support Staff 1 Posted by Yennick Trevels on 05 Apr, 2013 06:45 AM
Hi Nicolas,
Regarding the inputs and outputs, it looks like the flexUnit task has no inputs/outputs defined, so that's something we should fix. I will be doing a rework of this task when I find some time to make it more flexible.
Then about your main question. Currently this task does not add the test dependencies to the actionScriptProperties file and it's also not configurable. But what you probably can do is edit this file right after the flashbuilder task has run and add those test dependencies there. Something like this (not tested though):
Support Staff 2 Posted by Maxime Cowez on 06 Apr, 2013 10:41 PM
##Test dependencies
Unfortunately there is an answer to your
why not?
question. The reason that the test dependencies are not generated for a FlashBuilder (FB) project, is that FB "automagically" generates unit test dependencies when you run unit tests from within the IDE and there is absolutely nothing you can do to prevent it.If you use different dependencies (or different versions) than the ones generated by FB, they will all end up on the class path and screw things up magnificently. You simply can't use your custom unit test dependencies through FB.
So when I wrote this plugin, I figured there are three use cases (please correct me if I missed anything):
That's why I decided not to include test dependencies in the generated FB properties files. Perhaps we could enhance this by issuing a proper warning message instead of just failing silently.
##Source directories
As for the customization of the plugin: you sure have a valid point and I will look into it whenever I find some time ;)
But for your specfic case that won't be necessary, since the source directories are generated from GradleFx' core plugin which is configurable. The defaults are (as described in the docs:
So configuring your build script like this should give you a classic FB configuration:
or perhaps even less verbose (note: I haven't tested any of this):