-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CB-14263: (android) make cordova plugin compatible with cordova-android 7 #35
Conversation
src/PluginInfo/PluginInfo.js
Outdated
function _parseConfigFile (tag) { | ||
function _parseConfigFile (platform, tag) { | ||
var target = tag.attrib['target']; | ||
if (platform == 'android') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're currently trying to remove all platform specific code from cordova-common, so this might be a problem.
@jcesarmobile didn't you fix this in cordova-android? |
Hey @leo6104, ignoring what @raphinesse said - thanks for taking the time to create this! 🥇 I fully agree that some solution for this problem is badly needed. Let's see what @jcesarmobile says if this will be needed at all. |
This is the change I was talking about: apache/cordova-android#449 Does this address the same problem? |
@janpio @raphinesse Thank you for quick comment :) I agree with the point that if there is any platform-specific code should be implemented to cordova-android not cordova-common, i can do that and i will. But i didn't know what cordova-common plan before upload this issue because ConfigParser already have platform-specific code. :) I see the cordova-android issue and i found that in pluginHandlers, there is no [Existing Problem] |
I agree, I think we shouldn’t add platform specific code here. Also this will break old platforms on new cli, not sure what’s our support policy for older platforms on newer clips though. Also, I think this kind of problems should be fixed already in Cordova-android. Can you add cordova-Android from master or 7.1.x branch and see if the problem persists? And in case it persists, can you try to fix it there if possible? BTW, this is the PR that should have fixed the problem, as the real problem was cordova-Android not detecting properly the type of project, so it looked for the AndroidManifest.xml and some other files in the wrong location |
@jcesarmobile cordova-android master or 7.1.x branch dosn't work well. In ConfigChanges in cordova-common only do some plugin apply process. My thought about this issue (with minimum code changes in cordova-android)
Is it okay? or any ideas to fix it? |
I found strange behavior. For test, i remove all platforms & plugins folder in my project and run In platforms/android/app/src/main/res/xml/config.xml, while Discovering plugins & adding progress, it seems merge well. but after the command
Here is my plugin list. all of plugin version is latest |
After i remove Working version
|
I fixed an Javascript problem eslint was complaining about. Now the tests complain about real test failures Can you take a look please @leo6104? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have applied some updates to 7.1.x and master branches of cordova-android that should resolve the issues with XML files for plugins that have not been updated for Cordova 7. In case we encounter any more issues with plugin XML files I would rather we update cordova-android than this common package.
Platforms affected
cordova-android
What does this PR do?
My PR supports alias path in cordova-plugin config-file tag.
It will makes older cordova plugins's android config-file target compatible with cordova-android 7.
There is lots of problem with cordova-android 7 & cordova plugins. Many of cordova plugins still not upgraded to cordova-android 7 and there is limitation to wait for them to update their plugin.xml. So i think we need
What testing has been done on this change?
I create cordova-android 7 project with install cordova-plugin-device (only cordova-android <=6 support plugin)
and install via
npm i -g https://github.com/leo6104/cordova-cli.git
and run
cordova build android
and check
platforms/android/app/src/main/res/xml/config.xml
to correctly inject tagI also test this commit to my production hybrid app (30k~40k user scale DAU app - 14 cordova plugins)
Checklist