How to disable Flex SDK validations on the flexHome property
Hi,
I'm using GradleFx on a multi-project setup. Some of my co-worker (Java programmer) are not able to build their own project because of the Flex SDK validations execute in the actionscript project.
They always got the error : "The Flex home location isn't specified...". These validations came from the FlexSDKSpecifiedValidator::execute method.
Is there a way to prevent these validations to occur, at least in the gradle initialization/configuration phase? If possible, I don't want to add a Flex SDK dependency.
Thanks,
Jérémie
Comments are currently closed for this discussion. You can start a new one.
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 18 Jan, 2013 07:37 PM
Can you provide me the structure of your multi project setup? Because it
sounds like there is something wrong with your Gradle project structure.
Your flex projects should be in a separate subtree of your project, so that you can specify the flex sdk dependency only on that subtree
2 Posted by jeremie.charest on 18 Jan, 2013 08:50 PM
Our structure is the following (starting at the root project) :
We are new in the Gradle world so if you have suggestions they are more than welcome!
Support Staff 3 Posted by Yennick Trevels on 18 Jan, 2013 10:31 PM
I suggest you create one root project and two subprojects, one for your java code and one for your actionscript/flex code. That's the way to go in Gradle (which is somewhat similar to the Maven structure). If we do this the structure would look like this:
Furthermore I suggest you take a look at one of our sample projects which shows you the structure of a java + flex multiproject and how they can work together. It also shows you how you can put your compiled flex code in a war file. You can find the project here: https://github.com/GradleFx/GradleFx-Examples/tree/master/flex-java...
4 Posted by jeremie.charest on 21 Jan, 2013 04:11 PM
Thank you very much for the tip, it's now so much less painful!
But sadly it didn't solve the FLEX_HOME problem. I also tried, just to be sure, with the "flex-java-war" example with a fresh checkout and I still got the error.
Repo step :
1. Rename your FLEX_HOME to something else
2. Close all command line window (I'm on Windows)
3. Browse to flex-java-war/java and run a "gradle build"
4. You should get the error preventing you to build the java project
Support Staff 5 Posted by Yennick Trevels on 21 Jan, 2013 08:40 PM
If you get that error with the flex-java-war project, then that's normal,
because the java project (or the war), has a dependency to the flex project
because it needs to include the swf in the war. That's why it needs the
FLEX_HOME.
Are you sure that your FLEX_HOME environment variable is pointing to the root of your Flex SDK
6 Posted by jeremie.charest on 25 Jan, 2013 01:49 PM
I love Gradle! Because our sub-project are all encapsulated and don't depends on each other we can use the new configuration on demand incubating feature from Gradle 1.4. That fixed our problems and speed up our build time :
Configuration on demand
Support Staff 7 Posted by Yennick Trevels on 25 Jan, 2013 02:43 PM
Oh cool, didn't know that new feature :)
jeremie.charest closed this discussion on 25 Jan, 2013 03:31 PM.