How to add AIR framework libraries?
I'm build AIR library and application (not Flex).
My library project has reference to those external-libraries:
C:/CI/FlexSDK/Flex4.12.1_AIR13.0/frameworks/libs/air/airglobal.swc
C:/CI/FlexSDK/Flex4.12.1_AIR13.0/frameworks/libs/core.swc
C:/CI/FlexSDK/Flex4.12.1_AIR13.0/frameworks/libs/OSMF.swc
C:/CI/FlexSDK/Flex4.12.1_AIR13.0/frameworks/libs/textLayout.swc
C:/CI/FlexSDK/Flex4.12.1_AIR13.0/frameworks/libs/authoringsupport.swc
C:/CI/FlexSDK/Flex4.12.1_AIR13.0/frameworks/libs/air/servicemonitor.swc
And when I run gradle compileFlex -debug I see it is referring to those external-libraies:
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/framework.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/textLayout.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/spark.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/sparkskins.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/rpc.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/charts.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/spark_dmv.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/OSMF.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/mx/mx.swc'
'-external-library-path+=/Applications/Apache Flex/Flex4.12.1_AIR13.0/frameworks/libs/advancedgrids.swc'
How can I ask GradleFX to use AIR framework and not Flex framework? I still want to build swc file for AIR library.
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 09 Aug, 2014 08:17 AM
Have you set the 'frameworkLinkage' property to 'none'?
like this:
2 Posted by ido.ran on 09 Aug, 2014 08:47 AM
That will remove the references to flex framework but I still need to add references to AIR libraries as I wrote in my first question.
Is there a way to add frameworkLinkage for air?
It is not blocking, I've use none and I'm referencing the specific libraries I need but it will make the life a bit easier.
Thank you.
Support Staff 3 Posted by Yennick Trevels on 09 Aug, 2014 09:05 AM
Oh ok, I thought you figured that one out but where just having an issue with the Flex libraries that showed up :)
The thing is that, when using Flex, you get those libraries "for free" since it'll use one of the *-config.xml files provided with the SDK. But since you're not using Flex it won't use those files and you'll have to manually declare them as dependencies.
Just make sure you don't reference the AIR libraries with the absolute path, but by referencing them relatively from the Flex home directory like this:
4 Posted by ido.ran on 09 Aug, 2014 09:08 AM
I see, thank you - I'll do that.
Support Staff 5 Posted by Maxime Cowez on 10 Aug, 2014 12:23 PM
It looks like you're using a full blown Flex SDK. You might as well use a standalone AIR SDK instead (using the
airSDK
dependency; see http://doc.gradlefx.org/en/latest/sdk_auto_install.html), since it comes withmxmlc
andcompc
which are the tools that GradleFx requires to build your application.The AIR SDK has a custom version of `flex-config.xml' that only references those libraries required for AIR apps.
If you're not using auto-install (or perhaps if auto-install doesn't work for a standalone AIR SDK; should ask @Yennick, I'm not sure about that), you'll have to modify
flexHome
to point to the AIR SDK instead of the Flex SDK you're currently using.6 Posted by ido.ran on 10 Aug, 2014 02:42 PM
using airSDK in sdk_auto_install will only download the SDK for me.
I still need to use a frameworkLinkage to decide which SDK to use?
I think the problem is that today AIR and Flex SDK are intermingled.
Another thing is that I use AIR SDK and not Flex SDK.
I've successfully build my library by referencing only the files I listed above.
Support Staff 7 Posted by Yennick Trevels on 11 Aug, 2014 07:13 AM
@Maxim: If I remember right, you can specify the AIR SDK dependency without the Flex SDK dependency. Both auto-installs should set the flexHome property, so I think it should work.