[
https://issues.apache.org/jira/browse/CB-10332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15131792#comment-15131792
]
ASF GitHub Bot commented on CB-10332:
-------------------------------------
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/471#discussion_r51833532
--- Diff: www/docs/en/dev/guide/platforms/android/plugin.md ---
@@ -155,27 +158,24 @@ thread, but do not want to block the `WebCore` thread
either:
## Adding Dependency Libraries
-If a plugin requires additional libraries to work, you can use
-one of the following approaches to add them via `config.xml`.
+If your Android plugin has extra dependencies, they must be listed in the
+`plugin.xml` in one of two ways.
-Option A. Via _Gradle_ reference, for example:
-
- <framework src="com.android.support:support-v4:+" />
-
-This is a recommended approach as it allows multiple plugins
-to refer to the same dependency library such as _gson_,
-_android-support-v4_, _google-play-services_, etc and
-_Gradle_ will resolve duplicate dependencies using its
+The preferred way is to use the `<framework />` tag (see the
+[Plugin Specification](../../../plugin_ref/spec.html) for more details).
+Specifying libraries in this manner allows them to be resolved via Gradle's
[Dependency Management
logic](https://docs.gradle.org/current/userguide/dependency_management.html).
-
-Option B. As _JAR_ files placed to some plugin's folder and
-linked using `lib-file`, for example:
-
- <lib-file src="src/android/libs/gcm.jar"/>
-
-We recommend using this approach only if you are sure that
-dependency jar is plugin specific and won't be used by
-other plugins. Otherwise, there will be platform build issue.
+This allows commonly used libraries such as _gson_, _android-support-v4_,
+and _google-play-services_ to be used by multiple plugins without conflict.
+
+The second option is to use the `<lib-file />` tag to specify the location
of
--- End diff --
Does `framework` support a jar reference too? Are these mutually exclusive
or `framework` is always preferred over `lib-file`?
> Improve Android Guide
> ---------------------
>
> Key: CB-10332
> URL: https://issues.apache.org/jira/browse/CB-10332
> Project: Apache Cordova
> Issue Type: Task
> Components: Docs
> Reporter: Raghav
> Assignee: Richard B Knoll
> Labels: Docs-6.x
>
> We did a document scrub and found the following issues. Please feel free to
> correct other things as well.
> - Android Platform Guide
> -- Install Cordova Shell tools is out of date
> -- Environment variable instructions for Windows are out of date
> -- Emulator section can just point to
> http://developer.android.com/tools/devices/emulator.html
> -- Lots of duplicated content for create/build/deploy from CLI page
> -- Page keeps switching between CLI and platform-centric workflow
> - Android Shell Tool Guide
> -- Second paragraph is out of date
> -- Create/build/run/logging/clean should be clear that this is the
> platform-centric workflow. Also duplicated in Android Platform guide
> -- Platform-centric workflow should probably just get its own explicit page
> -- Signing an app doesn't actually say how to sign an app. Gives arguments
> for some mystery command
> --- Does this belong in our docs? We might just mention it and point to
> Google's app signing instructions
> - Android WebViews
> -- Needs investigation if this is still supported.
> --- Step 1 is wrong (should be getting cordova-android by cloning or from npm)
> --- Step 3 needs to have instructions for adding jars to gradle
> --- Step 5 is out of date. CordovaActivity does not implement
> CordovaInterface... Think they should be extending/modifying CordovaActivity.
> Needs investigation
> --- Step 6 does not appear to be camera plugin specific
> --- Step 7 example is useless, it needs to be fleshed out
> - Android plugins
> -- Should be moved to plugin developer docs
> -- Need a reference for the classes that plugins have access to
> --- CordovaWebView, CallbackContext, CordovaPlugin, etc.
> --- Most already have javadoc
> -- Android Integration should be renamed and link to the Android classes it's
> talking about
> -- Debugging Android plugins is out of date (mentions Eclipse and jars) and
> should probably be fleshed out a bit
> - Android Configuration
> -- Should be a reference
> - Upgrading Android
> -- Ends at 4.0.0 (current is 4.1.1, soon to be 5.0.0)
> -- Needs to be reorganized in some way
> --- The instructions seem to be pretty much the same for versions 1.6.0 +
> -- Goes back to the phonegap days! Should probably only include Cordova
> versions (1.5.0 +)
> -- Upgrade to 1.8.0 from 1.7.0 repeated twice
> -- Upgrade to 1.8.0 from 1.8.0 is a typo
> General guidelines:
> - While giving examples, keep them short. Do not repeat for all
> plugins/platforms.
> - Remove all references to cordova plugin registry.
> - Remove Tizen references. The platform is deprecated
> (http://markmail.org/message/hryg6sjswecpgndu)
> - Keep information up to date for the platforms, CLI and plugins
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]