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

ASF GitHub Bot commented on CB-9782:
------------------------------------

GitHub user vladimir-kotikov opened a pull request:

    https://github.com/apache/cordova-android/pull/226

    CB-9782 Implements PlatformApi contract for Android platform

    This is an implementation for 
[CB-9782](https://issues.apache.org/jira/browse/CB-9782) - PlatformApi 
compatible api for android platform, which could be used by cordova and other 
tools as a separate NodeJS module.
    
    The main entry point for new API is 
[/bin/templates/cordova/Api.js](https://github.com/MSOpenTech/cordova-android/blob/2023e87c93a7d2ea665b93e02a9034e3927c27c2/bin/templates/cordova/Api.js),
 which exposes all the methods, defined in PlatformApi spec at 
https://github.com/cordova/cordova-discuss/pull/12
    
    Since the PR contains a lot of changes, here is the main points of interest:
    
    1. 
[Api.js](https://github.com/MSOpenTech/cordova-android/blob/2023e87c93a7d2ea665b93e02a9034e3927c27c2/bin/templates/cordova/Api.js)
 which looks similar to PlatformApi polyfill implementation, but contains only 
android-specific code.
    2. `build`/`run`/`check_reqs` scripts are reworked, so they are used as 
corresponding `Api` methods implementations (bound to `Api` instance at runtime)
    3. 'prepare' logic from cordova-lib/metadata/android_parser copied into 
[`prepare`](https://github.com/MSOpenTech/cordova-android/blob/2023e87c93a7d2ea665b93e02a9034e3927c27c2/bin/templates/cordova/lib/prepare.js)
 module.
    3. `build` script refactored and split into number of 'builders': 
[`GradleBuilder`](https://github.com/MSOpenTech/cordova-android/blob/2023e87c93a7d2ea665b93e02a9034e3927c27c2/bin/templates/cordova/lib/builders/GradleBuilder.js),
 
[`AntBuilder`](https://github.com/MSOpenTech/cordova-android/blob/2023e87c93a7d2ea665b93e02a9034e3927c27c2/bin/templates/cordova/lib/builders/AntBuilder.js)
    4. All the logic that deals with `Androidmanifest.xml` factored into 
[`AndroidManifest` 
class](https://github.com/MSOpenTech/cordova-android/blob/2023e87c93a7d2ea665b93e02a9034e3927c27c2/bin/templates/cordova/lib/AndroidManifest.js)
    5. `exec` and `spawn` modules are removed in favor of `cordova-common`

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-android CB-9782

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-android/pull/226.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #226
    
----
commit adc7b035fddaba3faf26ba77d2a8659f3f4926ff
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-09-29T14:51:29Z

    Initial Api implementation:
    
    * rework 'build' command
    * Make build script working separately

commit 2f2c062eedbb82834ca6140f9a4b2603fb6ce418
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-09-30T08:15:14Z

    Make `run` working through PlatformApi

commit d08b1d7b8f41095d2c240ff87f84daf393777c62
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-09-30T08:17:06Z

    Make `clean` working through PlatformApi

commit b51d10c79710d181ea763e0405ccede6c39afec7
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-06T13:39:31Z

    Cleaning up
    
    * Adding .jshint and fixing multiple minor issues
    * Remove excess merging logic in case when defaults.xml doesn't exists
    * Got rid of internal getPlatformInfo usage

commit 4dc16e6c53398f94ed4db1b1b2502d206ad7117f
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-06T13:41:18Z

    Enable 'requirements' command

commit eae3404bcccfe949953f35c02d4aa0e6cdf6f443
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-07T13:04:05Z

    Refactor AndroidManifest manipulation to separate class
    
    * Also slightly update java files manipulation to make more readable

commit 9696a48ed42db57047ebe9503afa5a3f38f41d68
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-07T13:54:34Z

    Adding draft support for addPlugin/removePlugin

commit 5bd08d76df6afe6a927a45f0b21f961ba2cdd8ad
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-07T13:02:00Z

    Switch to using cordova-common's superspawn

commit 2f9188a6277946cdd43cd24ce953142015cb4bca
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-07T13:39:12Z

    Move node_modules to package's root

commit c190a933e398180dc9996dea8c5d87850be366be
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-07T13:47:31Z

    JSHint fixups

commit 136ab87b5852ea0ca515a792be8dc4c583488b42
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-09T07:29:00Z

    Introduce Adb wrapper

commit aa6c48dab279adec660e8102a9df90f4cf325c38
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-09T07:30:29Z

    Switch to events and CordovaError from cordova-common

commit 10a335f91f6680959945b17ce6adb0665763b8db
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-09T09:55:40Z

    Refactor builders to dedupe some code

commit b42d135773274b37c6c957d25f67fea99184758e
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-09T09:31:41Z

    Rework create/update scripts to expose via PlatformApi

commit 9607ce7bb1ee6105c554116024a284355c1ab7f7
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-09T12:57:03Z

    Revisit package dependencies
    
      * Get rid of which dependency
      * Bump shelljs depednency to prevent issues with copying linked 
node_modules on windows

commit b6cac2c0ce42c6b397fdfa8c528fe4c634228867
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-09T13:58:29Z

    Rework create to copy cordova-js sources along with other javascript

commit a8278a1aa88e744b59dfa79419c047c9b300d32f
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-09T14:07:51Z

    Adding bundled dependencies to repo

commit c4c75855367b09d6074308f6f01f4ed729b9da42
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-12T11:47:23Z

    Got rid of simpleargs in favor of nopt

commit d7892f81fb31713582debaa9919ab8dd6d62e83a
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-12T11:48:19Z

    Factor out prepare logic to separate file

commit 2023e87c93a7d2ea665b93e02a9034e3927c27c2
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-12T12:50:37Z

    Update check_reqs to use CordovaError

commit 91878e9cb07c917c35e20234b40180b09a42d589
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-12T14:59:39Z

    Round out all TODOs:
    
    * Make getPackageName instance method of AndroidProject
    * Retrieve version from VERSION instead of hardcoded value
    * Rename pluginHandlers and move get* methods there
    * Remove non-actual TODOs

commit c105a9bacadebd709caba66b91badea27f52e5bd
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-10-12T15:07:52Z

    Rename PlatformApiPoly -> Api

----


> Implement and expose PlatformApi for Android
> --------------------------------------------
>
>                 Key: CB-9782
>                 URL: https://issues.apache.org/jira/browse/CB-9782
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: Android
>            Reporter: Vladimir Kotikov
>            Assignee: Vladimir Kotikov
>             Fix For: 5.0.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to