Cannot change the location of a gradleReference in a Cordova plugin for Android -
i'm using cordova / ionic 2 / android.
i have 1 plugin following plugin.xml file:
<?xml version="1.0" encoding="utf-8"?> <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-hash-generator" version="0.0.1" > <name>hash generator</name> <js-module name="main" src="www/hash-generator.js"> <clobbers target="hashgenerator" /> </js-module> <platform name="android"> <config-file parent="/*" target="res/xml/config.xml"> <feature name="hashgenerator"> <param name="android-package" value="com.tophtml.plugins.hashgenerator" /> </feature> </config-file> <source-file src="src/android/com/tophtml/plugins/hashgenerator.java" target-dir="src/com/tophtml/plugins/" /> </platform> <framework src="src/android/build.gradle" custom="true" type="gradlereference" /> </plugin> this plugin use gradle import third party tools.
my problem when do:
$ ionic platform add android then, following directory created:
\platforms\android\cordova-plugin-hash-generator and want change location of directory, example, to:
\platforms\android\gradle\cordova-plugin-hash-generator other that, works when run previous command , following one:
$ ionic run android -l the third party tools imported gradle work properly.
i don't location because if have multiple plugins use third party tools, directory: \platforms\android have lot of these directories , that's not practice thinking in organization.
i tried adding parent on following line on plugin.xml file above in following way:
<framework src="src/android/build.gradle" custom="true" type="gradlereference" parent="gradle" /> but directory: cordova-plugin-hash-generator gets generated in same location (with no errors, though) when doing:
$ ionic platform add android but when doing:
$ ionic run android -l i following errors:
any idea on how change location of directory?


Comments
Post a Comment