Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK autoinstall breaks when using AIR with Flex 4.6 #217

Closed
jlopez opened this issue Jan 21, 2016 · 5 comments
Closed

SDK autoinstall breaks when using AIR with Flex 4.6 #217

jlopez opened this issue Jan 21, 2016 · 5 comments
Milestone

Comments

@jlopez
Copy link
Contributor

jlopez commented Jan 21, 2016

When declaring the following flex sdk dependency:

// artifactPattern 'http://download.macromedia.com/pub/flex/sdk/[module]_[revision].[ext]'
flexSDK group: 'org.apache', name: 'flex_sdk', version: '4.6', ext: 'zip'

the SDK autoinstall feature will fail to overlay the AIR SDK on top of the extracted Flex SDK.

This is because the Air Sdk installer looks for lib/adt.jar, which happens to be present in this particular Flex SDK.

jlopez added a commit to jlopez/GradleFx that referenced this issue Jan 21, 2016
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.
jlopez added a commit to jlopez/GradleFx that referenced this issue Jan 21, 2016
Rely on a special file created by GradleFX itself to determine if a
particular SDK has already been installed (.air.sentry and .flex.sentry)
instead of relying on files bundled by the SDK. This solves a couple of
issues:

* Some flex distributions bundle lib/adt.jar which was previously used
  to determine if the Air SDK was already installed (GradleFx#217)
* There's no single file present in all Air SDKs that can be used to
  reliably determine if its installed
* Interrupting the SDK auto install process (via ^C) will leave the
  SDK in a partially installed state and future runs of GradleFX will
  not attempt to fix that.

As a small side effect, the first time the updated GradleFX is used, the
SDK will be unpacked again, since these .sentry files will not be
present.
@SlevinBE
Copy link
Member

PR has been merged.

@SlevinBE SlevinBE added this to the Next milestone Jan 23, 2016
@SlevinBE
Copy link
Member

Little bit after the fact, but I noticed that Flex 4.6 does come bundled with the AIR SDK (see https://helpx.adobe.com/flash-builder/release-note/flex-4-6-sdk-release.html). So in fact the lib/adt.jar is a valid file to detect the AIR SDK.

However, I do like your approach with the sentry files, as it allows one to overlay this specific Flex SDK with another AIR SDK (even while this is discouraged by Adobe). It also has a certain kind of clearness to it. So I will keep this, but with a fallback to the old approach in case the user specifies the Flex/AIR sdk manually with the 'flexhome' property.

@SlevinBE
Copy link
Member

Fallback mechanism: 683d7aa

@jlopez
Copy link
Contributor Author

jlopez commented Jan 26, 2016

Interesting about 4.6. It must be a really old version of air that is bundled, since the way I noticed that the Air SDK wasn't being downloaded was because the resulting SDK failed to compile my Air project (missing things like Event.SUSPEND which were added back in 3.3)

Thanks for the merge.

@SlevinBE
Copy link
Member

Probably because Flex 4.6 is also quite old by now, it's still from the Adobe days. Now that Flex is under the Apache flag I think it reached 4.14 already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants