Gradlefx + Flexunit
Hi,
I'm new in using gradle + gradlefx + flex unit. I've some issues
getting everything to work. I followed the flex unit example in
github and tried to get it to work in my project. My project is a
multi project with java and flex. My configs are:
The libraries are from the github and are deployed in my repository
with different versions.
dependencies{
test group: 'org.hamcrest', name: 'hamcrest-as3', version: "1.1.3", ext: 'swc'
test group: 'org.flexunit', name: 'flexunittasks', version: '4.1', ext:'jar'
test group: 'org.flexunit', name: 'flexunit', version: '4.1', ext:'swc'
test group: 'org.flexunit', name: 'flexunitcilistener', version: '4.1', ext:'swc'
test group: 'org.flexunit', name: 'flexunituilistener', version: '4.1', ext:'swc'
}
flexUnit{
template = 'src/test/resources/TemplateFlexUnitRunner.mxml'
}
testDirs = ['src/test/actionscript']
testResourceDirs = ['src/test/resources']
When I'm trying to execute "gradle test" I get an error
"TestRunnerBase : Could not resolve to a component
implementation.". Can you help me with this?
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:66)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 43 more
Caused by: java.lang.Exception: mxmlc execution failed: Konfigurationsdatei /Users/user/.gradle/gradleFx/sdks/dd3c86f780716dfbb45ac80db3732ee47e7f4c1d/frameworks/flex-config.xml wird geladen
/Users/user/workspace/Project/flexclient/build/reports/FlexUnitRunner.mxml(43): Fehler: <flexUnitUIRunner:TestRunnerBase> konnte nicht zu einer Komponentenimplementierung aufgelöst werden.
<flexUnitUIRunner:TestRunnerBase id="uiListener" width="100%" height="100%" />
at org.gradlefx.cli.CommandLineInstruction.handleError(CommandLineInstruction.groovy:233)
at org.gradlefx.cli.CommandLineInstruction.execute(CommandLineInstruction.groovy:213)
at org.gradlefx.cli.CommandLineInstruction$execute.call(Unknown Source)
at org.gradlefx.tasks.Test.runFlexUnit(Test.groovy:61)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
TIA!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 28 Feb, 2014 07:51 AM
Hi,
Have you used the exact same Runner template as in this sample project?
https://github.com/GradleFx/GradleFx-Examples/blob/master/flexunit-...
Other than that I can't see anything wrong. You've correctly defined the uilistener and cilistener dependencies, so normally it should find that class.
2 Posted by afrischk on 28 Feb, 2014 08:07 AM
Hi,
yes. It's exactly the same. I 've tried to comment out the TestRunnerBase tag. Then the imported packages can't be found and resolved. There seem's to be a problem with the library paths. But I have no clue what it could be.
Support Staff 3 Posted by Yennick Trevels on 28 Feb, 2014 08:16 AM
Maybe a stupid question, but are you sure you haven't uploaded the cilistener swc twice by accident, so that the uilistener dependency is actually the cilistener swc?
Just want to make sure this isn't the case, since they can be easily mixed because of their similar name :)
4 Posted by afrischk on 28 Feb, 2014 08:24 AM
There are no stupid questions ;-) I've looked it up and I didn't mixed them up.
5 Posted by afrischk on 28 Feb, 2014 08:39 AM
Hey,
I' ve just made out that including the files with
works to get the dependencies resolved. But now I get this error:
6 Posted by afrischk on 28 Feb, 2014 08:56 AM
Now I got it to work. I renamed the files exactly how you have named them in the GitHub examples because It seems the Ant tasks require these names. After that I have provided the flash player exe in the command property.
Next thing I want to try is to put the libs in my repository again.
Done.
:-)