So if I understand you correctly, FlexJS would be outputting an “apk”-file 
because it invokes Cordova internally?

I would vote -1 on that. 

The problem here is that we are tightly coupling FlexJS and Cordova. We then 
have one execution, that does generation, compilation and packaging (Maven 
terms) in one step … I would like to keep the compilation and the packaging 
separate. Wouldn’t it be possible to generate the Cordova configuration 
containing the plugins needed in the compilation of a “type=cordova” 
compilation and to use that later on in the packaging phase of the build?

As an alternative, in maven we could use a dedicated packaging type to automate 
the configuration of flexjs-maven-plugin and the cordova-maven-plugin to do 
what currently I’m manually doing in the examples if you activate the 
“with-cordova” Maven profile. On the Ant target you could integrate the call to 
Cordova, but I would not like to see this Cordova invocation in the compiler 
itself.

For example, when activating the “with-cordova” profile, in
“flexjs-framework/examples/flexjs/CordovaCameraExample/target/template/platforms/android/build/outputs/apk/android-debug.apk”
 the maven build produces the Android APK version of the application with 
Cordova. But when I just tried installing the application for the first time, 
this didn’t quite work as expected, so I would be glad for some assistance on 
what’s going wrong there. If the compiler now produced the config.xml as output 
and cordova would just pick that up, that would be great, but I would not like 
the compiler to do any more. 

Chris



Am 31.01.17, 20:08 schrieb "Alex Harui" <aha...@adobe.com>:

    
    
    On 1/31/17, 10:16 AM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote:
    
    >Hi Alex,
    >
    >I’ll have a look at the changes and eventually try to prepare the maven
    >plugin for these changes.
    
    In theory, MXMLJSC is backwards compatible.  I will try to remember to
    make sure of that before merging to develop.
    
    Longer term, I leave it up to you and others to decide if the Maven
    support should be tweaked.  In some ways, MXMLJSC and the compiler.targets
    option may only be needed for non-Maven users, especially in IDEs where
    you want one launch of the compiler to compile against different API sets.
     If I understand Maven correctly, you can already do that with Maven by
    having the POM dictate to run the various compiler "executions".
    
    >
    >Just to be on the safe side … with “cordova” you mean producing a
    >directory that I can pass into cordova. Not include the cordova
    >functionality in Flex, correct?
    
    IMO, the goal is to produce, for Cordova for Android, a .apk file.  You
    shouldn't have to pass anything into Cordova.  We pretty much know the
    steps are going to be the same every time so why make you do those steps
    some other way.  I was going to call Cordova CLI to do it so it works in
    the Node distribution.  Again this might be only for non-Maven users.  The
    key here is that one of the pain points around Cordova is remembering to
    add the various plugins to your Cordova Project.  Because the FlexJS
    Publisher visits every .JS file, it is possible that on the visit we can
    see that a plugin is needed and automatically add the plugin.  But maybe
    in Maven for Cordova you have to specify the plugin in the POM anyway.
    
    -Alex
    
    

Reply via email to