capacitor icon indicating copy to clipboard operation
capacitor copied to clipboard

feat: Allow to remove all cordova related code

Open xzilja opened this issue 4 years ago • 5 comments

Feature Request

Describe the Feature Request

Having started new project with capacitor I'm really excited about its future. I saw that a lot of cordova related stuff is still left in some file, we even have capacitor.build.gradle file that is generated with cordova dependency every time capacitor update is ran.

This feels like unnecessary / legacy stuff in new projects and if I am correct capacitor works perfectly fine without cordova?

Would it be possible to add section in docs or some flag to cli that allows to generate cordova free project / shows how to remove it from existing project?

Platform Support Requested

  • [x] Android
  • [x] iOS
  • [ ] Electron
  • [ ] Web

Describe Preferred Solution

  1. Ability to un-select cordova as dependency when creating new project
  2. Documentation for removing cordova in existing apps

Describe Alternatives

Perhaps a blog post covering this?

Related Code

These are all places where I found reference to cordova files.

  • /android/.gitignore
  • /android/app/build.gradle
  • /android/app/capacitor.build.gradle
  • /android/app/src/main/res/xml/config.xml
  • /android/settings.gradle
  • /ios/.gitignore
  • /ios/App/App/config.xml
  • /ios/App?Podfile

Additional Context

Perhaps it is enough to just remove all cordova references from these files, but once again there are files like capacitor.build.gradle that are auto generated and reference it and I think project would break?

xzilja avatar Jan 21 '20 17:01 xzilja

Issues tagged with feature request are closed but tracked for reactions to gauge interest.

jcesarmobile avatar Jan 21 '20 18:01 jcesarmobile

Docs on migrating, then removing Cordova are here.

dotNetkow avatar Feb 05 '20 22:02 dotNetkow

No, this is about the cordova compatibly code that capacitor projects include.

jcesarmobile avatar Feb 06 '20 00:02 jcesarmobile

Yep. For me personally I think only autogenerated capacitor.build.gradle is what's preventing me from completely removing all references to cordova. Perhaps additional flag in capacitor config file like cordova: false (default true) would be enough? However, I am not sure if capacitor relies on some cordova files to exist during builds.

xzilja avatar Feb 06 '20 07:02 xzilja

Any news about this? It would also be nice to get rid of the required deprecated jcenter repository because of Cordova 7.

Mereo4 avatar Jun 08 '22 08:06 Mereo4