Skip to content

Commit

Permalink
Resolve GradleFx#217: Properly detect if air needs to be installed
Browse files Browse the repository at this point in the history
Rely on airsdk.xml instead of lib/adt.jar which happens to be present in
some Flex SDK distributions (e.g. http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip).

While airsdk.xml hasn't always been present on air distributions, it has
been bundled since air 3.2. Unfortunately there's no single file that
has always been present and that is not present in all Flex
distributions.
  • Loading branch information
jlopez committed Jan 21, 2016
1 parent 71f4b27 commit 5fc8f52
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -24,7 +24,11 @@ import org.gradlefx.configuration.Configurations

class CreateAirSdkInstallLocationState extends AbstractCreateSdkInstallLocationState {
CreateAirSdkInstallLocationState(Boolean isInstallationRequired) {
super(SdkType.AIR, "lib/adt.jar", Configurations.AIRSDK_CONFIGURATION_NAME.configName(), isInstallationRequired)
// lib/adt.jar is unfortunately present in some flex distributions
// (e.g. flex 4.6), so it's not a good choice.
// airsdk.xml has been present since air 3.2
// air-sdk-description.xml since air 4.0
super(SdkType.AIR, "airsdk.xml", Configurations.AIRSDK_CONFIGURATION_NAME.configName(), isInstallationRequired)
}

@Override
Expand Down

0 comments on commit 5fc8f52

Please sign in to comment.