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

Andrew Grieve commented on CB-8320:
-----------------------------------

I think what you could do is something along the lines of:

1. Create a new cordova project via bin/create
2. Change it to be a library project rather than an app (empty out the 
manifest.xml, change the gradle include)
3. Make your app depend on this library
4. plugman install into the library instead of your main app.

If plugins try to make config-changes base on the presence of an <activity> 
within your AndroidManifest.xml, then they might not work, but I suspect most 
things would be fine with this setup.

If you do try it out and have success with it, would love to know. Might be 
worth adding a ./bin/create --library option if so.

> Cordova Plugin Add Doesn't Work With Newer Android Project Structure
> --------------------------------------------------------------------
>
>                 Key: CB-8320
>                 URL: https://issues.apache.org/jira/browse/CB-8320
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Graham Mueller
>              Labels: gradle, plugins
>
> We've recently started to use the newer project structure recommended for the 
> [Android 
> Tools|http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure].
>  The basic idea is
> {code}
> /platforms/android
>   /build.gradle
>   /settings.gradle
>   /etc...
>   /cordova
>   /CordovaLib
>   /APP_NAME
>     /build.gradle
>     /src
>       /main
>         /assets
>         /res
>         /java
>           /...
> {code}
> When you try to run {{cordova plugin add ...}}, it assumes you have the 
> assets, res, and src at the root of the Android directory. Is there any way 
> to change this expectation, since the newer projects are kind of expected to 
> be this way? I acknowledge that the Android cmd line tool doesn't do this 
> yet, but you can't expect Google to keep up with their own tools.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to