[ 
https://issues.apache.org/jira/browse/CB-4430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13744936#comment-13744936
 ] 

Axel Nennker commented on CB-4430:
----------------------------------

Here is a new android.js file that adds support for lib-file to android.
I could not figure out what the best way to contribute is... Commenting on this 
issue is probably not optimal.

Axel

/*
 *
 * Copyright 2013 Anis Kadri
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 *
*/

var fs = require('fs')  // use existsSync in 0.6.x
   , path = require('path')
   , common = require('./common')
   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));

module.exports = {
    www_dir:function(project_dir) {
        return path.join(project_dir, 'assets', 'www');
    },
    // reads the package name out of the Android Manifest file
    // @param string project_dir the absolute path to the directory containing 
the project
    // @return string the name of the package
    package_name:function (project_dir) {
        var mDoc = xml_helpers.parseElementtreeSync(path.join(project_dir, 
'AndroidManifest.xml'));

        return mDoc._root.attrib['package'];
    },
    "source-file":{
        install:function(source_el, plugin_dir, project_dir, plugin_id) {
            var dest = path.join(source_el.attrib['target-dir'], 
path.basename(source_el.attrib['src']));
            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, 
dest);
        },
        uninstall:function(source_el, project_dir, plugin_id) {
            var dest = path.join(source_el.attrib['target-dir'], 
path.basename(source_el.attrib['src']));
            common.deleteJava(project_dir, dest);
        }
    },
    "lib-file":{
        install:function(lib_el, plugin_dir, project_dir) {
            var src = lib_el.attrib.src;
            var dest = path.join("libs", path.basename(src));
            common.copyFile(plugin_dir, src, project_dir, dest);
        },
        uninstall:function(lib_el, project_dir) {
            var src = lib_el.attrib.src;
            var dest = path.join("libs", path.basename(src));
            common.removeFile(project_dir, dest);
        }
    }
};

                
> <lib-file> should be usable on platforms other than BB10 (wherever it makes 
> sense)
> ----------------------------------------------------------------------------------
>
>                 Key: CB-4430
>                 URL: https://issues.apache.org/jira/browse/CB-4430
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugman
>    Affects Versions: 3.0.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>
> https://groups.google.com/forum/#!topic/phonegap/dAXi8p_vjOE
> Currently <lib-file> is only supported on BB10. Someone had an issue where 
> they tried using it for Android .jars. Are there any other platforms where 
> <lib-file> should be supported / an analogue to another element?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to