Error: configuration variable 'load-config' expected 1 argument(s), got 0.
I found that I can build the ActionScript project with AIR 4.0 SDK only in the IDE. Then I tried to force using AIR 4.0 SDK only (no FLEX) to run the grade build. It was not successful at the beginning that compc.jar and mxmlc.jar were not found. I created symbolic links for them (compc.jar -> compc-cli.jar and mxmlc.jar -> mxmlc-cli.jar). I can successfully run the build for the type in swc and frameworkLinkage in external but can't for the type in swc and frameworkLinkage in none. both mxmlc and compc have the same issue
Compiling with compc
-load-config= <<<<<<<<<<<<<<<<<<<<<<<
-external-library-path+=/Users/root/Desktop/AIRSDK_Compiler//frameworks/libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc
-source-path+=/Users/root/Desktop/swc/GreenSock-AS3/src
-include-sources+=/Users/root/Desktop/swc/GreenSock-AS3/src
-library-path+=/Users/root/Desktop/AIRSDK_Compiler/frameworks/libs/asc-support.swc
-library-path+=/Users/root/Desktop/AIRSDK_Compiler/frameworks/libs/core.swc
-library-path+=/Users/root/Desktop/AIRSDK_Compiler/frameworks/libs/air/aircore.swc
-library-path+=/Users/root/Desktop/AIRSDK_Compiler/frameworks/libs/air/airglobal.swc
-library-path+=/Users/root/Desktop/AIRSDK_Compiler/frameworks/libs/air/applicationupdater.swc
-library-path+=/Users/root/Desktop/AIRSDK_Compiler/frameworks/libs/air/applicationupdater_ui.swc
-library-path+=/Users/root/Desktop/AIRSDK_Compiler/frameworks/libs/air/servicemonitor.swc
-library-path+=/Users/root/Desktop/AIRSDK_Compiler/frameworks/libs/player/12.0/playerglobal.swc
-target-player=12.0
-output=/Users/root/Desktop/swc/GreenSock-AS3/build/greensock.swc
I found out the error came from -load-config= nothing. Then I
took a look to your source from github.
In org.gradlefx.cli.CommandLineInstruction line 51
I changed from reset CompilerOption.LOAD_CONFIG to
arguments.minus(CompilerOption.LOAD_CONFIG)
because your comment said "if it is a pure AS project, we don't
want to load the Flex configuration" but this still pass
"-load-config=" to build process and break the build.
I made a change based on "my" error and your comment. I don't know whether it is correct or not. Later I will request pull (including the test) to your github
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 Maxime Cowez on 03 Feb, 2014 10:07 AM
Hi Wood,
the
-load-config=thing is there on purpose. If you don't specify that flag explicitly to be nothing, mxmlc will automatically useflex-config.xmlby default and we wanted to avoid loading the Flex framework dependencies when they aren't needed.I think the case we've overlooked is the compilation of a library (i.e.
type='swc'in GradleFx) that has dependencies on the AIR libraries but not the Flex SDK libraries.As a workaround you could add the swcs from
[flex-sdk]\frameworks\libs\airto your dependencies, or you can explicitly setload-config=air-config.xmlexplicitly through theadditionalCompilerOptions.Max
2 Posted by wood on 03 Feb, 2014 02:17 PM
Hi Max,
I tried to explicitly set -load-config in additionalCompilerOptions before addressing this issue and it's still failed with the same error
In short, if
frameworkLinkage="none"for thetype="swc"ortype="swf", it must have the error.I have questions about "not loading the Flex framework dependencies when they aren't needed".
1. Are they spark.swc, mx.swc, OSMF.swc...?
2. Why we still need to specify the FLEX dependencies in build.gradle for the installation?. Now I can totally get rid of FLEX SDK and build my project with AIR SDK only. if you only use AIR SDK only to run the build, it will automaticially load Adobe AIR version's flex-config.xml.
3. Can you let us choose either one of AIR SDK or FLEX SDK for the build? there is no need to specify both.
Support Staff 3 Posted by Maxime Cowez on 03 Feb, 2014 03:18 PM
If you set
load-config=air-config.xmlin additionalCompilerOptions and it printsload-config=in the output, then that's a bug. Can you confirm that's what you did?About your questions:
1. Yes, basically all dependencies that are configured in the flex-config.xml file of your sdk
2. If you're saying that you have to have the flexSDK dependency in order to use the airSDK dependency, then I think that could be improved. I took a look at the flex-config.xml in the AIR SDK and it seems to be only a stub; there are no dependencies defined in it. So I guess to fix your issue we'll have to conditionally change the load-config flag based on the selected SDK(s).
3. @Yennick wrote that part, so he'll have to tell us if it can't already be done and - if not -how hard it would be to add that feature.
4 Posted by wood on 03 Feb, 2014 03:49 PM
Let me give you the details
Support Staff 5 Posted by Yennick Trevels on 05 Feb, 2014 06:48 PM
Ok, so couple of things I found out:
Support Staff 6 Posted by Maxime Cowez on 05 Feb, 2014 10:15 PM
That
configuration variable 'load-config' expected 1 argument(s), got 0.thing is a novelty too. I'm pretty sure the compiler accepted an empty -load-config flag before.Or is it only the AIR sdk's version of the compiler(s) that has this particularity?
Now how do we compile a project with no framework dependencies? Do we package a
no-sdk-config.xmlfile with GradleFx and use that instead?7 Posted by wood on 06 Feb, 2014 07:23 AM
I found two things
AIR SDK already have compc and mxmlc since AIR 3.4. If you go to http://helpx.adobe.com/air/kb/archived-air-sdk-version.html, you will find there are two versions, with and without Compiler. if you choose Adobe AIR SDK with Compiler, you will see compc-cli and mxmlc-cli in the lib folder.
I try to build it with this command
I can conclude that Adobe AIR and Apache FLEX have their own specific compiler options. I would say it is possible to let us choose either one of dependency to build the AS project
Support Staff 8 Posted by Yennick Trevels on 06 Feb, 2014 07:44 AM
k, wasn't aware that they published two versions of the AIR SDK.
9 Posted by wood on 06 Feb, 2014 08:14 AM
One more things, I can help you to code the plugin if you need
Support Staff 10 Posted by Yennick Trevels on 06 Feb, 2014 11:05 AM
Sure, feel free to fork our repo and provide us a pull request. This would certainly help a lot! :-)
11 Posted by wood on 13 Feb, 2014 05:05 AM
Please review
https://github.com/wood1986/GradleFx/commit/af0ea000a46d597c9d5a877...
Support Staff 12 Posted by Yennick Trevels on 14 Feb, 2014 07:00 AM
Thank you for this work! I'll try to review it this weekend.
13 Posted by soywiz on 14 Feb, 2014 02:06 PM
I had this problem too. Just for the record. I think there are three kind of sdks:
http://www.adobe.com/devnet/flex/flex-sdk-download.html
http://www.adobe.com/devnet/air/air-sdk-download.html
http://flex.apache.org/download-binaries.html
The adobe flexsdk is discontinued. But the airsdk is being updated by adobe frequently also it includes actionscript compiler 2.0. I'm using it for pure as3 projects (without any mxml) and I got the problem reported by wood.
Support Staff 14 Posted by Yennick Trevels on 17 Feb, 2014 07:55 AM
Hi, I've reviewed the code. Overall, looks good, but I've found two issues:
15 Posted by wood on 17 Feb, 2014 05:19 PM
I am unable to created a test case. As the set is backed with a Map, I dont know how to do?
Done! But CommandLineInstruction.groovy still have the same issue. Am I correct?
Support Staff 16 Posted by Yennick Trevels on 19 Feb, 2014 08:20 AM
What we maybe can do is put the code which determines whether the Flex SDK is specified behind an interface. That way that logic is isolated to one class and can be easily mocked when using it in the CommandLineInstruction (or anywhere else).
Support Staff 17 Posted by Yennick Trevels on 26 Feb, 2014 06:14 PM
Hi,
When you're done, feel free to push a pull request. Then I'll merge it in the main codebase. It would be very much appreciated :)
Cheers,
Yennick
18 Posted by wood on 02 Mar, 2014 05:41 PM
Hi Yennick,
All fixed with a new test case and please review
https://github.com/GradleFx/GradleFx/pull/125
Thanks,
WooD
19 Posted by wood on 04 Mar, 2014 06:33 PM
Any update with my code??
Support Staff 20 Posted by Yennick Trevels on 04 Mar, 2014 06:45 PM
Merging and testing it right now along with some other pull requests
Support Staff 21 Posted by Yennick Trevels on 04 Mar, 2014 09:06 PM
The code has been merged in our develop branch and should be available on the snapshot repo (https://oss.sonatype.org/content/repositories/snapshots/) as version 0.8.2-SNAPSHOT
22 Posted by wood on 05 Mar, 2014 11:38 AM
Thanks for accepting my code