You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "DavidWiesner (via GitHub)" <gi...@apache.org> on 2023/09/07 08:10:13 UTC

[GitHub] [cordova-android] DavidWiesner opened a new issue, #1663: config resource-file is copied to the wrong target

DavidWiesner opened a new issue, #1663:
URL: https://github.com/apache/cordova-android/issues/1663

   # Bug Report
   
   ## Problem
   when defining a `<resource-file src="example.xml" target="res/values/example.xml" />` see [cordova documentation config.xml](https://cordova.apache.org/docs/en/11.x/config_ref/#resource-file) the src-file is not copied into the application-resources folder `<platform-dir>/app/src/main/`, but instead to the `<project-dir>`. In contrast when defining the same `<resource-file />` in a plugin.xml, the file will be copied to the right destination see https://github.com/apache/cordova-android/blob/e61e271f5bbb517a9598078f7a1ad7585bfe5f9c/lib/pluginHandlers.js#L61
   
   ### What is expected to happen?
   The defined src should be copied within the application-resource folder `<platform-dir>/app/src/main/`
   
   
   ### What does actually happen?
   The src-file will be copied to the `<project-dir>`
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   <!--
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Cordova Packages:
   
       cli: 12.0.0
           common: 5.0.0
           create: 5.0.0
           lib: 12.0.1
               common: 5.0.0
               fetch: 4.0.0
               serve: 4.0.1
   
   Project Installed Platforms:
   
       android: 12.0.1
   
   Ionic:
   
      Ionic CLI : 7.1.1
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [cordova-android] jcesarmobile commented on issue #1663: config resource-file is copied to the wrong target

Posted by "jcesarmobile (via GitHub)" <gi...@apache.org>.
jcesarmobile commented on issue #1663:
URL: https://github.com/apache/cordova-android/issues/1663#issuecomment-1719457985

   I feel like the config.xml behavior is the correct behavior, since you might want to add files to other folders, not just to `app/src/main`.
   In example a common case of usage for resource-file is to copy the `google-services.json` file, which needs to be inside `app` folder, not in `app/src/main` folder.
   But changing the behavior for plugins at this point will break a lot of plugins, so I think we should document the difference of behavior when using it in `config.xml` vs `plugin.xml`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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