tag:support.gradlefx.org,2011-05-23:/discussions/problems/2212-merged-dependency-doesnt-work-for-swcairGradleFx: Discussion 2015-07-12T09:02:41Ztag:support.gradlefx.org,2011-05-23:Comment/361505532015-02-26T20:12:37Z2015-02-26T20:12:38Zmerged dependency doesn't work for swcAir<div><p>For the record, I can manually work around this by replacing the
proj1 configuration with:<br></p>
<pre>
<code>project(':proj2') {
additionalCompilerOptions = ['-library-path+=/tmp/repro/proj1/build/proj1.swc']
}</code>
</pre>
<p>However, this feels like a hack.</p></div>wenslayertag:support.gradlefx.org,2011-05-23:Comment/361505532015-02-26T23:52:38Z2015-02-26T23:52:42Zmerged dependency doesn't work for swcAir<div><p>Looking at the code, it appears this problem manifests in
<a href=
"https://github.com/GradleFx/GradleFx/blob/master/src/main/groovy/org/gradlefx/cli/common/optioninjectors/LibraryOptionsInjector.groovy">
<code>LibraryOptionsInjector.groovy</code></a>.</p>
<p>The function <a href=
"https://github.com/GradleFx/GradleFx/blob/master/src/main/groovy/org/gradlefx/cli/common/optioninjectors/LibraryOptionsInjector.groovy#L58-67">
<code>addLibraries()</code></a> expects files for its first
argument, but <a href=
"https://github.com/GradleFx/GradleFx/blob/master/src/main/groovy/org/gradlefx/cli/common/optioninjectors/LibraryOptionsInjector.groovy#L32-35">
<code>addMergedLibraries()</code></a> passes in
<code>project.configurations.merged.files</code>, and for
<code>swcAir</code> types, that translates to
<code>/path-to/proj1/build/proj1.swcAir</code>, which doesn't make
sense (it should just be
<code>/path-to/proj1/build/proj1.swc</code>).</p>
<p>So I believe the fix involves correcting how files are
constructed for the project when the type is <code>swcAir</code>,
or doing that mapping in <code>LibraryOptionsInjector.groovy</code>
(but that doesn't seem like the right place though).</p>
<p>I'll investigate the project.configuration.files side of
things...</p></div>wenslayertag:support.gradlefx.org,2011-05-23:Comment/361505532015-02-27T00:46:03Z2015-02-27T00:46:06Zmerged dependency doesn't work for swcAir<div><p>I filed <a href=
"https://github.com/GradleFx/GradleFx/issues/166">issue #166</a> in
GitHub.</p></div>wenslayertag:support.gradlefx.org,2011-05-23:Comment/361505532015-02-27T20:51:24Z2015-02-27T20:51:24Zmerged dependency doesn't work for swcAir<div><p>Fixed by wenslayer @ <a href=
"https://github.com/GradleFx/GradleFx/pull/167">https://github.com/GradleFx/GradleFx/pull/167</a></p></div>Yennick Trevels