The Flex home location isn't specified

Joe's Avatar

Joe

18 Oct, 2012 10:04 PM

Hey I'm a little new to all this... can someone tell me why I'm getting the "The Flex home location isn't specified" with the following script:

buildscript {

repositories {
    mavenCentral()
}
dependencies {
    classpath group: 'org.gradlefx', name: 'gradlefx', version: '0.5'
}

}

flexHome="C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0"

apply plugin: 'gradlefx'

println 'test: ' + flexHome

version = '1.0-SNAPSHOT'
type = 'swc'

  1. Support Staff 1 Posted by Yennick Trevels on 19 Oct, 2012 01:00 PM

    Yennick Trevels's Avatar

    Can you try putting the flexHome declaration after "apply plugin: 'gradlefx'"? Don't know whether this matters that much, but you never know :)

  2. 2 Posted by Joe on 19 Oct, 2012 01:21 PM

    Joe's Avatar

    That seemed to have no effect.

  3. Support Staff 3 Posted by Yennick Trevels on 19 Oct, 2012 01:44 PM

    Yennick Trevels's Avatar

    it should at least give an error that the flexHome location isn't valid when flexHome is specified after the "apply plugin" line. When it's located above the "apply plugin" line than Gradle can't find the property.

  4. 4 Posted by Joe on 19 Oct, 2012 02:31 PM

    Joe's Avatar

    Does anyone have any ideas? This is pretty important for us as a lot of our projects rely on different SDK versions.

  5. Support Staff 5 Posted by Yennick Trevels on 19 Oct, 2012 02:38 PM

    Yennick Trevels's Avatar

    But do you still get the "The Flex home location isn't specified" error or did it change to a "The Flex home location isn't valid"?

  6. 6 Posted by Joe on 19 Oct, 2012 03:03 PM

    Joe's Avatar

    Oh sorry I misunderstood... it stayed "The Flex home location isn't specified" even after I moved it to after the plugin declaration. It does work when I set the environmental variable to the same path.

  7. Support Staff 7 Posted by Yennick Trevels on 19 Oct, 2012 06:44 PM

    Yennick Trevels's Avatar

    I can't seem to reproduce the problem you have, only when I put flexHome before the "apply plugin" declaration it's giving me the same error.

    Can you download this sample project and:
    1. change the flexHome variable in build.gradle to your Flex sdk's install location
    2. execute the "gradlew compile" command from command line

    https://docs.google.com/open?id=0BwgTrjDn2SAhYjZuRk9wTmF5emc

    This project is working here, so I want to see whether it's something with your environment/project configuration.

  8. 8 Posted by Joe on 19 Oct, 2012 09:52 PM

    Joe's Avatar

    I was able to run that program and for some reason immediately afterward the original build started working. Perhaps the original build where flexhome was before the plugin declaration was getting cached somewhere. I'm still learning the ropes with gradle, but it works now.

    Thanks!

  9. Yennick Trevels closed this discussion on 29 Oct, 2012 09:40 PM.

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