flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: AW: AW: AW: AW: [ASJS] Merging to Maven
Date Fri, 29 Apr 2016 15:03:27 GMT


On 4/29/16, 2:45 AM, "Christofer Dutz" <christofer.dutz@c-ware.de> wrote:

>
>Ok ... so it turned out that it wasn't quite that easy ...
>
>While Core now builds nicely I had problems with all of the others. Till
>I noticed that I don't have to reference Core in frameworks, but Core in
>externs ... So it seems each project is compiled 3-4 times: AS --> JS, JS
>--> Extern, AS + JS --> SWC then I need all different types of
>dependencies to SWCs containing Flash and JS code and then ones to
>Externs containing just Flash ... We definitely need to work on this.

There shouldn't be 4 compiles in a project.  Where did you see that?

I wrote this up a few weeks back [1] to try to explain the process.

Basically, the set of APIs a library may want to present to downstream
libraries can be different if compiling to run on Flash vs run in the
browser.  For example, the parent property is a
flash.display.DisplayObjectContainer in Flash, and an
org.apache.flex.core.IUIBase in the browser.  And thus, each library
should produce a SWC with COMPILE::AS3=true,COMPILE::JS=false, and for
COMPILE::AS3=false,COMPILE::JS=true.  Both of those use compc.  The first
compile uses compjsc to actually generate .JS files from the .AS with
COMPILE::AS3=false,COMPILE::JS=true.

Right now the frameworks/libs folder holds SWCs with
COMPILE::AS3=true,COMPILE::JS=false, that contain the generated .JS files
from the compjsc compile.  At some point, we could teach compjsc to pack
its output in a SWC so the order you run the compiles doesn't matter as
much.  The frameworks/externs folder holds SWCs built with
COMPILE::AS3=false,COMPILE::JS=true.  If you want to add some suffix or
prefix to the names of the those SWCs that should be fine with me.

The Application developer should only use the SWCs in frameworks/libs
because the APIs they need to use should be the same in both SWCs.  In
theory, it is only the developers of downstream libraries that should need
the SWCs currently in frameworks/externs.

Maybe there is a better way to do this, but this is what I've been able to
do given our current circumstances.

HTH,
-Alex

[1] https://cwiki.apache.org/confluence/display/FLEX/Creating+SWCs

Mime
View raw message