tag:support.gradlefx.org,2011-05-23:/discussions/problems/166-error-configuration-variable-load-config-expected-1-arguments-got-0GradleFx: Discussion 2016-08-11T02:31:42Ztag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-03T10:07:34Z2014-02-03T10:07:34ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Hi Wood,</p>
<p>the <code>-load-config=</code> thing is there on purpose. If you
don't specify that flag explicitly to be nothing, mxmlc will
automatically use <code>flex-config.xml</code> by default and we
wanted to avoid loading the Flex framework dependencies when they
aren't needed.</p>
<p>I think the case we've overlooked is the compilation of a
library (i.e. <code>type='swc'</code> in GradleFx) that has
dependencies on the AIR libraries but not the Flex SDK
libraries.</p>
<p>As a workaround you could add the swcs from
<code>[flex-sdk]\frameworks\libs\air</code> to your dependencies,
or you can explicitly set <code>load-config=air-config.xml</code>
explicitly through the <code>additionalCompilerOptions</code>.</p>
<p>Max</p></div>Maxime Coweztag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-03T14:17:37Z2014-02-03T14:17:37ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Hi Max,</p>
<p>I tried to explicitly set -load-config in
additionalCompilerOptions before addressing this issue and it's
still failed with the same error<br></p>
<pre>
<code>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
-load-config=/Users/root/Desktop/AIRSDK_Compiler/frameworks/flex-config.xml</code>
</pre>
<p>In short, if <code>frameworkLinkage="none"</code> for the
<code>type="swc"</code> or <code>type="swf"</code>, it must have
the error.</p>
<p>I have questions about "not loading the Flex framework
dependencies when they aren't needed".<br>
1. Are they spark.swc, mx.swc, OSMF.swc...?<br>
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.<br>
3. Can you let us choose either one of AIR SDK or FLEX SDK for the
build? there is no need to specify both.</p></div>woodtag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-03T15:18:43Z2014-02-03T15:18:43ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>If you set <code>load-config=air-config.xml</code> in
additionalCompilerOptions and it prints <code>load-config=</code>
in the output, then that's a bug. Can you confirm that's what you
did?</p>
<p>About your questions:<br>
1. Yes, basically all dependencies that are configured in the
flex-config.xml file of your sdk<br>
2. If you're saying that you <em>have</em> 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).<br>
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.</p></div>Maxime Coweztag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-03T15:49:16Z2014-02-03T15:50:29ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Let me give you the details</p>
<pre>
<code>------------------------------------------------------------
Gradle 1.10
------------------------------------------------------------
Build time: 2013-12-17 09:28:15 UTC
Build number: none
Revision: 36ced393628875ff15575fa03d16c1349ffe8bb6
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy: 2.2.0
JVM: 1.7.0_51 (Oracle Corporation 24.51-b03)
OS: Mac OS X 10.9.1 x86_64
------------------------------------------------------------
build.gradle
------------------------------------------------------------
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: "org.gradlefx", name: "gradlefx", version: "0.8.1"
}
}
apply plugin: "gradlefx"
additionalCompilerOptions = [
"-allow-source-path-overlap=true",
"-omit-trace-statements=true",
"-as3=true",
"-debug=false",
"-es=false",
"-optimize=true",
"-show-actionscript-warnings=true",
"-strict=true",
"-target-player=12.0",
"-verbose-stacktraces=false",
"-warnings=true",
"-load-config=air-config.xml"
]
srcDirs += ["src"]
output = "greensock"
type = "swc"
frameworkLinkage = "none"
------------------------------------------------------------
output
------------------------------------------------------------
Starting Build
Settings evaluated using settings file '/Users/wood/Desktop/swc/settings.gradle'.
Projects loaded. Root project using build file '/Users/wood/Desktop/swc/build.gradle'.
Included projects: [root project 'swc', project ':GreenSock-AS3']
Evaluating root project 'swc' using build file '/Users/wood/Desktop/swc/build.gradle'.
Compiling build file '/Users/wood/Desktop/swc/build.gradle' using StatementExtractingScriptTransformer.
Compiling build file '/Users/wood/Desktop/swc/build.gradle' using BuildScriptTransformer.
Evaluating project ':GreenSock-AS3' using build file '/Users/wood/Desktop/swc/GreenSock-AS3/build.gradle'.
Using the flexHome convention
All projects evaluated.
Selected primary tasks 'clean', 'compileFlex'
Tasks to be executed: [task ':GreenSock-AS3:clean', task ':GreenSock-AS3:compileFlex']
:GreenSock-AS3:clean (Thread[main,5,main]) started.
:GreenSock-AS3:clean
Executing task ':GreenSock-AS3:clean' (up-to-date check took 0.001 secs) due to:
Task has not declared any outputs.
:GreenSock-AS3:clean UP-TO-DATE
:GreenSock-AS3:clean (Thread[main,5,main]) completed. Took 0.012 secs.
:GreenSock-AS3:compileFlex (Thread[main,5,main]) started.
:GreenSock-AS3:compileFlex
Executing task ':GreenSock-AS3:compileFlex' (up-to-date check took 0.167 secs) due to:
Output file /Users/wood/Desktop/swc/GreenSock-AS3/build has changed.
Output file /Users/wood/Desktop/swc/GreenSock-AS3/build/greensock.swc has been removed.
Compiling with compc
-load-config=
-external-library-path+=/Users/wood/Desktop/AIRSDK_Compiler//frameworks/libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc
-source-path+=/Users/wood/Desktop/swc/GreenSock-AS3/src
-include-sources+=/Users/wood/Desktop/swc/GreenSock-AS3/src
-allow-source-path-overlap=true
-omit-trace-statements=true
-as3=true
-debug=false
-es=false
-optimize=true
-show-actionscript-warnings=true
-strict=true
-target-player=12.0
-verbose-stacktraces=false
-warnings=true
-load-config=air-config.xml
-output=/Users/wood/Desktop/swc/GreenSock-AS3/build/greensock.swc
[ant:java] Java Result: 4
:GreenSock-AS3:compileFlex FAILED
:GreenSock-AS3:compileFlex (Thread[main,5,main]) completed. Took 2.068 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':GreenSock-AS3:compileFlex'.
> java.lang.Exception: compc execution failed: command line
Error: configuration variable 'load-config' expected 1 argument(s), got 0.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.</code>
</pre></div>woodtag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-05T18:48:22Z2014-02-05T18:48:22ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Ok, so couple of things I found out:</p>
<ol>
<li>Apparently compc and mxmlc are packaged with the AIR SDK since
4.0. This wasn't the case with earlier versions. That's also the
reason why it didn't work without the Flex SDK, and why we require
you to specify the Flex SDK.<br></li>
<li>In your output I can see that the -load-config parameter is
specified twice, once by GradleFx and once by you. I would've
thought the second one would override the first one (as it usually
does), but apparently that doesn't seem to work. So it looks like
we have to fix this.<br></li>
<li>With your symbolic links, you should be able to specify only
the FlexSDK. During the initialization, GradleFx will check two
files:<br>
<ul>
<li>To determine whether the Flex SDK is installed, it will check
the 'lib/mxmlc.jar' file</li>
<li>To determine whether the AIR SDK is installed, it will check
the 'lib/adt.jar' file So when you only specify the Flex SDK, I
think it should be happy.</li>
</ul>
</li>
</ol></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-05T22:15:27Z2014-02-05T22:15:27ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>That <code>configuration variable 'load-config' expected 1
argument(s), got 0.</code> thing is a novelty too. I'm pretty sure
the compiler accepted an empty -load-config flag before.<br>
Or is it only the AIR sdk's version of the compiler(s) that has
this particularity?</p>
<p>Now how do we compile a project with no framework dependencies?
Do we package a <code>no-sdk-config.xml</code> file with GradleFx
and use that instead?</p></div>Maxime Coweztag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-06T07:23:26Z2014-02-06T07:24:01ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>I found two things</p>
<ol>
<li>
<p>AIR SDK already have compc and mxmlc since AIR 3.4. If you go to
<a href=
"http://helpx.adobe.com/air/kb/archived-air-sdk-version.html">http://helpx.adobe.com/air/kb/archived-air-sdk-version.html</a>,
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.</p>
</li>
<li>
<p>I try to build it with this command<br></p>
<pre>
<code>compc -load-config= -external-library-path+=C:\Users\WooD\Desktop\AIRSDK_Compiler/frameworks/libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc -source-path+=C:\Users\WooD\Desktop\GreenSock-AS3\src -include-sources+=C:\Users\WooD\Desktop\GreenSock-AS3\src -accessible=false -allow-source-path-overlap=true -omit-trace-statements=true -as3=true -debug=true -es=false -optimize=true -show-actionscript-warnings=true -strict=true -target-player=12.0 -verbose-stacktraces=false -swf-version=23 -warnings=true -output=C:\Users\WooD\Desktop\GreenSock-AS3\build\GreenSock-AS3.swc</code>
</pre></li>
</ol>
<p>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</p></div>woodtag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-06T07:44:21Z2014-02-06T07:44:21ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>k, wasn't aware that they published two versions of the AIR
SDK.</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-06T08:14:40Z2014-02-06T08:15:00ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>One more things, I can help you to code the plugin if you
need</p></div>woodtag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-06T11:05:38Z2014-02-06T11:05:38ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Sure, feel free to fork our repo and provide us a pull request.
This would certainly help a lot! :-)</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-13T05:05:51Z2014-02-13T05:05:51ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Please review<br>
<a href=
"https://github.com/wood1986/GradleFx/commit/af0ea000a46d597c9d5a877b3bfd6377c90c72b0">
https://github.com/wood1986/GradleFx/commit/af0ea000a46d597c9d5a877...</a></p></div>woodtag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-14T07:00:16Z2014-02-14T07:00:28ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Thank you for this work! I'll try to review it this weekend.</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-14T14:06:16Z2014-02-14T14:06:20ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>I had this problem too. Just for the record. I think there are
three kind of sdks:</p>
<p><a href=
"http://www.adobe.com/devnet/flex/flex-sdk-download.html">http://www.adobe.com/devnet/flex/flex-sdk-download.html</a><br>
<a href=
"http://www.adobe.com/devnet/air/air-sdk-download.html">http://www.adobe.com/devnet/air/air-sdk-download.html</a><br>
<a href=
"http://flex.apache.org/download-binaries.html">http://flex.apache.org/download-binaries.html</a></p>
<p>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.</p></div>soywiztag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-17T07:55:55Z2014-02-17T07:55:55ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Hi, I've reviewed the code. Overall, looks good, but I've found
two issues:</p>
<ol>
<li>flexConvention.configPath.contains("flex-sdk"): As you already
suggest in your comment, it's rather hacky and probably shouldn't
stay in there :)<br></li>
<li>In Compc.groovy, Asdoc.groovy & Mxmlc.groovy => when
determining whether the user has specified the sdk, only checking
the configuration isn't enough since he can choose not to use
dependencies and specify the flexHome variable directly</li>
</ol></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-17T17:19:35Z2014-02-18T07:10:35ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><ol>
<li>
<p>I am unable to created a test case. As the set is backed with a
Map, I dont know how to do?<br></p>
<pre>
<code>project.configurations.getByName(Configuration.FLEXSDK_CONFIGURATION.configName()).files</code>
</pre></li>
<li>
<p>Done! But CommandLineInstruction.groovy still have the same
issue. Am I correct?</p>
</li>
</ol></div>woodtag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-19T08:20:38Z2014-02-19T08:20:38ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><ol>
<li>I've also been having issues sometimes with writing unit tests
for some of the build code. I think it's generally quite hard,
since it relies quite heavily on external systems (filesystem,
compilers, etc.).<br>
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).<br></li>
<li>Nice! As for the CommandLineInstruction.groovy, that indeed
still has the same issue.</li>
</ol></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-02-26T18:14:22Z2014-02-26T18:14:22ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Hi,</p>
<p>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
:)</p>
<p>Cheers,<br>
Yennick</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-03-02T17:41:20Z2014-03-02T17:41:39ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Hi Yennick,</p>
<p>All fixed with a new test case and please review<br>
<a href=
"https://github.com/GradleFx/GradleFx/pull/125">https://github.com/GradleFx/GradleFx/pull/125</a></p>
<p>Thanks,<br>
WooD</p></div>woodtag:support.gradlefx.org,2011-05-23:Comment/314198852014-03-04T18:33:49Z2014-03-04T18:33:49ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Any update with my code??</p></div>woodtag:support.gradlefx.org,2011-05-23:Comment/314198852014-03-04T18:45:04Z2014-03-04T18:45:04ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Merging and testing it right now along with some other pull
requests</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-03-04T21:06:58Z2014-03-04T21:06:58ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>The code has been merged in our develop branch and should be
available on the snapshot repo (<a href=
"https://oss.sonatype.org/content/repositories/snapshots/">https://oss.sonatype.org/content/repositories/snapshots/</a>)
as version 0.8.2-SNAPSHOT</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/314198852014-03-05T11:38:21Z2014-03-05T11:38:21ZError: configuration variable 'load-config' expected 1 argument(s), got 0.<div><p>Thanks for accepting my code</p></div>wood