I'm building a Cordova Android plugin. I want to use a 3rd party View
inside an Intent
that is created by the plugin (specifically scissors).
Normally (in non Cordova projects) I would go to my project's build.gradle
file and add it like this:
dependencies {
compile 'com.lyft:scissors:1.0.1' }
But it seems like the build.gradle
file in my plugin's project wasn't meant to be touched?
What is the proper way to add a dependency to a plugin project, to support both builds via Cordova and builds via Android Studio?
Same question, but for a local project (not hosted on GitHub).
Apache Cordova Is Retired: Alternatives for Cross Platform Mobile Development in 2022. Future trends of cross-platform mobile development are already starting to emerge, and it appears that Apache Cordova won't be included in the list of frameworks that power hybrid web apps for mobile devices.
When adding plugins or platforms, use the --save flag to add them to config. xml. Ex: cordova platform add android --save. Existing projects can use cordova plugin save and cordova platform save commands to save all previously installed plugins and platforms into your project's config.
You have to use your own gradle file then link it on the plugin.xml
like this
<framework src="relative/path/your.gradle" custom="true" type="gradleReference" />
You have to put that tag on the plugin.xml
, so on plugin install it's read and cordova handles it (not sure how it works internally, but I suppose that it copies the values from your custom .gradle to the main build.gradle).
So you can't test it on your current project, you have to create a new project and add the plugin and see if it works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With