This includes upgrading the plugin to the latest structure as well:
By looking at a newly generated plugin there where a few changes.
Core:
package.json: replace capacitor/core with capacitor/android and capacitor/ios
web.ts register the plugin by
import { registerWebPlugin } from '@capacitor/core';
registerWebPlugin(FileSharer);
This did not work in the betas but should be fixed now. The workaround in the app.component.ts can be removed because the plugin is already registered.
Android:
Move sources to /android/ and remove subfolders @byteowls/capacitor-.../. The subfolders were needed in the past but not anymore
Copy the settings.gradle from the generated project because the capacitor/android from node_modules is used
Replace the capacitor library depencency implementation 'ionic-team:capacitor-android:1.0.0-beta.17' with a project dependenyimplementation project(':capacitor-android')`
This includes upgrading the plugin to the latest structure as well:
By looking at a newly generated plugin there where a few changes.
Core:
capacitor/core
withcapacitor/android
andcapacitor/ios
This did not work in the betas but should be fixed now. The workaround in the app.component.ts can be removed because the plugin is already registered.
Android:
/android/
and remove subfolders@byteowls/capacitor-.../
. The subfolders were needed in the past but not anymoresettings.gradle
from the generated project because the capacitor/android from node_modules is usedimplementation 'ionic-team:capacitor-android:1.0.0-beta.17' with a project dependeny
implementation project(':capacitor-android')`