Problems building an AIR file
Hello,
I'm currently at the final steps in migrating a complex Flex application built previously with Maven/flex-mojos to Gradle/gradlefx. However, the final phase of generating the air distribution file is giving me problems.
Here is the snippet of the relevant information extracted from my build.gradle :
type = 'air'
output = "$name-$version"
air {
applicationDescriptor 'src/resources/myapp.xml'
includeFileTrees = [
fileTree(dir: 'src/resources/logoApp', include: '**/*.png')
]
keystore 'my_certificate.p12'
storepass 'mypassword'
output "${output}.air"
}
And the output is (edited for brevity) :
$ gradled clean build -x test -i
...
Using the Flex SDK dependency
Determining SDK install location
Setting flexHome to C:\Users\nestrada\.gradle\gradleFx\sdks\c80f35d3a72d7158e0f1f90f7f31632e0ac85534
All projects evaluated.
No publish configurations specified for project ':' - using the default 'archives' configuration.
Selected primary tasks 'clean', 'build'
Tasks to be executed: [task ':clean', task ':copyresources', task ':compileFlex', task ':build']
:clean
Task ':clean' has not declared any outputs, assuming that it is out-of-date.
:copyresources
Task ':copyresources' has not declared any outputs, assuming that it is out-of-date.
from D:\myapp\build
:compileFlex
Executing task ':compileFlex' due to:
Output file D:\myapp\build has changed.
Compiling with mxmlc
+configname=air
-source-path+=D:\myapp\src
-source-path+=D:\myapp\locale/{locale}
-locale=en_US,fr_FR
-external-library-path+=C:\Users\nestrada\.gradle\caches\artifacts-24\filestore\com.i3s\i3sflex\1.4.1-SNAPSHOT\swc\c2fba26c96475feaa697272af56351c453c6128a\i3sflex-1.4.1-SNAPSHOT.swc
-external-library-path+=C:\Users\nestrada\.gradle\caches\artifacts-24\filestore\com.i3s\libstoolz\1.4.1-SNAPSHOT\swc\661a58aa3e472e135b6087f0cacebba969699051\libstoolz-1.4.1-SNAPSHOT.swc
-external-library-path+=C:\Users\nestrada\.gradle\caches\artifacts-24\filestore\com.i3s\StoolZApps\1.3.1-SNAPSHOT\swc\fb37dedd9e0631dc6cd930c0de8632924fe640ef\StoolZApps-1.3.1-SNAPSHOT.swc
-output=D:\myapp\build\MyApp-1.3.2-SNAPSHOT.air.swf
D:\myapp\src\MyApp.mxml
[mxmlc] Loading configuration file C:\Users\nestrada\.gradle\gradleFx\sdks\c80f35d3a72d7158e0f1f90f7f31632e0ac85534\frameworks\air-config.xml
D:\myapp\build\MyApp-1.3.2-SNAPSHOT.air.swf (1658283 bytes)
:build
Skipping task ':build' as it has no actions.
BUILD SUCCESSFUL
Total time: 16.986 secs
For some reason, the swf suffix is constantly appended to the output file. I've played around with the example in the GradleFx-Examples git project and it seems that the air-single-project also generates a swf file and not an air file. I'm also kind of new to AIR development, so if I'm missing something not related to gradlefx, I'm all ears :)
Thanks for any help
Nicolas
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
Support Staff 1 Posted by Yennick Trevels on 03 Jun, 2013 02:06 PM
the build task doesn't depend on the 'package' task, which packages the swf file into an air file. So you have to call the package task to do this (or make the build task depend on the package task).
I guess that's also something we can build into GradleFx. So that we automatically make the build task depend on the package task when we encounter an air project. But for now doing this manually should do the trick ;)
2 Posted by Nicolas Estrada on 04 Jun, 2013 10:58 AM
Thanks! I completely missed that tasks (being my first AIR project)... I'm not really sure what build does besides provide a shortcut for multiple tasks (compileFlex, test) but I'll try to look at my task list closer next time I change types :)
Thanks again
Yennick Trevels closed this discussion on 24 Jul, 2013 04:30 PM.