tag:support.gradlefx.org,2011-05-23:/discussions/problems/84-flex-home-not-specifiedGradleFx: Discussion 2013-07-24T16:31:39Ztag:support.gradlefx.org,2011-05-23:Comment/265588302013-04-25T00:09:52Z2013-04-25T00:09:52ZFlex home not specified<div><p>Small note: setting the FLEX_HOME environment variable to the
path of the gradlefx install directory for the sdk
(~/.gradle/gradleFx/sdks/{hash}) then running the gradle build
command works. Obviously not a true solution, but at least shows
that the downloaded sdk works properly.</p></div>dnmcgoytag:support.gradlefx.org,2011-05-23:Comment/265588302013-04-25T05:50:41Z2013-04-25T05:52:01ZFlex home not specified<div><p>Can you provide me the following information:</p>
<ul>
<li>Gradle version</li>
<li>GradleFx version</li>
<li>the output of your build with info logging (add '--info' to
your gradle command)</li>
</ul></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/265588302013-04-29T15:36:13Z2013-04-29T15:36:13ZFlex home not specified<div><p>Sorry for the very delayed response, have had other fires to put
out.<br>
Here's the info :<br>
gradle version : 1.4 is what brew installs, but I have downloaded
1.5 and it also has the same problem<br>
gradlefx version : 0.6 is what I used initially, although I'm now
specifying 0.6.4.. both seem to have the same problem<br>
I can't share the log right now, but I can share this piece of
it:<br></p>
<pre>
<code>Determining SDK install location
Setting flexHome to /Users/Donnie/.gradle/gradleFx/sdks/{hash}
Using the Air SDK dependency
Determining SDK install location
All projects evaluated.
Selected primary task 'build'</code>
</pre>
<p>This led me to try to set flexHome directly in one of the gradle
files (since it seems to be attempting to point at the right
place), and I find that setting that value doesn't appear to have
any effect.<br>
If you need a full log file, I'll need to edit it a bit and send it
directly, but hopefully that's the info you were curious about in
the --info.</p></div>dnmcgoytag:support.gradlefx.org,2011-05-23:Comment/265588302013-04-29T18:14:38Z2013-04-29T18:14:38ZFlex home not specified<div><p>So what I can see in that piece of logging is that it sets
flexHome in one project (the one for which you posted the config),
so that looks correct, but it can't find the Flex SDK installation
for the other project (client_swc).</p>
<p>Both these projects should use the autoinstall configuration.
You can do this by creating a parent project(directory) with a
build.gradle file. This file can look like this:</p>
<pre>
<code>subprojects {
apply plugin: 'gradlefx'
repositories {
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = 'Apache'
// pattern for url http://apache.cu.be/flex/4.9.0/binaries/apache-flex-sdk-4.9.0-bin.zip
addArtifactPattern 'http://download.macromedia.com/pub/flex/sdk/[module]_[revision].[ext]'
}
}
dependencies {
flexSDK group: 'org.apache', name: 'flex_sdk', version: '4.5.1', ext: 'zip'
}
sdkAutoInstall {
showPrompts = false
}
}</code>
</pre></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/265588302013-04-29T19:14:38Z2013-04-29T19:30:20ZFlex home not specified<div><p>While that does need to be moved up (and that dependency is
copy-pasta-ed in client_swc.. that refactoring is a little more
complicated).. should that error still exist if I ran a very direct
command like:<br></p>
<pre>
<code>gradle client_swc:build</code>
</pre>
and the auto install dependencies are in the build.gradle for
client_swc as well?
<p>(Therein lies one of the complications, I have a sub sub project
in client_main called Main, so simply moving the dependency up one
level doesn't do, and applying gradlefx as a plugin to client_main
isn't right since client_main isn't producing a flash artifact).
Anyway, I'm overcomplicating at this point.. and still trying to
dig here, because most of this is most likely due to my environment
(and there's only so much I can share unfortunately)</p></div>dnmcgoytag:support.gradlefx.org,2011-05-23:Comment/265588302013-04-29T19:36:50Z2013-04-29T19:36:50ZFlex home not specified<div><p>if you also specified the flexSDK dependency in the client_swc
project then it should work fine.<br>
I'll see if I can create a reproducible case.</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/265588302013-04-29T19:39:50Z2013-04-29T19:39:50ZFlex home not specified<div><p>Cool.. I'll try to come up with something very generic that
reproduces my environment without anything proprietary so that we
can isolate what's going on. Thanks for all your help again. Its
insanely appreciated.</p></div>dnmcgoytag:support.gradlefx.org,2011-05-23:Comment/265588302013-05-01T07:26:53Z2013-05-01T07:26:53ZFlex home not specified<div><p>I created a test case with two swc based projects, with
duplicated configurations for the sdk auto-install. But I can't
reproduce the problem. Can you see whether the attached test case
is working on your system?</p></div>Yennick Trevels