Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
110 stars 139 forks source link

replace .jar with <framework> #156

Closed krisrak closed 8 years ago

krisrak commented 8 years ago

replace the android-support-v4.jar with <framework src="com.android.support:support-v4:+" />, cause if another plugin has <framework src="com.android.support:support-v4:+" />, then intel-xdk build was failing.

google-play-services.jar also cause build failure in IntelXDK if another plugin has <framework src="com.google.android.gms:play-services-gcm:+" />, but this cannot be replaced because of gradle workaround.

also a merge conflict was not fixed in last commit for intel-xdk branch.

shaders commented 8 years ago

fixed in 4.1.0-1 https://www.npmjs.com/package/pushwoosh-intel-xdk-plugin

krisrak commented 8 years ago

@shaders Where is the code intel-xdk branch to download? users have to download plugin to install in xdk

shaders commented 8 years ago

For Intel XDK you should: Add pushwoosh-intel-xdk-plugin as Third-Party Plugin To download plugin you can try master branch: https://github.com/Pushwoosh/pushwoosh-phonegap-plugin

krisrak commented 8 years ago

@shaders what about the gradle workaround, is that getting applied somehow ?

shaders commented 8 years ago

You have to manually add these changes to build.gradle

krisrak commented 8 years ago

we cannot add this currently in build.gradle using IntelXDK, thats the reason we wanted google-play-services.jar, this was solving the issue

shaders commented 8 years ago

i'm confused - does it work now with the plugin from the master branch?

krisrak commented 8 years ago

@shaders no it does not install on device if there is another app that also uses pushwoosh, the gradle workaround is not applied if I use master branch. We need the intel-xdk branch with google-play-services.jar instead of adding play services as <framework>.

shaders commented 8 years ago

So you dropped support jar file but left play-services as a jar? Can you add play services as a framework (using framework tag) there?

krisrak commented 8 years ago

yes, if I add play-services as <framework>, then it is same as master, it will not install on device.

the reason I changed android-support-v4.jar to <framework> was cause if another plugin had android-support-v4 as <framework> it was failing build with error, so adding as <framework> will fix the cordova build.

adding play-service as jar will fix the install issue in some cases, but if there is another plugin with play-services as <framework> then build will fail, in this case we have no workaround, our team is planning on adding a workaround for gradle script on the intel-xdk build system, but in the mean time, we need the intel-xdk branch with only play-services as jar, so that some users can still use pushwoosh with intel-xdk

DimanAM commented 8 years ago

I see. I was hoping there is a method to apply this hook in Intel XDK. But it appears Intel XDK does not support hooks and custom gradle scripts (is there really no way to modify platforms directory?). I returned separate intel-xdk branch and published it as pushwoosh-intel-xdk-plugin@4.2.0. BTW Intel XDK references "pushwoosh-pgb-plugin" as featured plugin for some reason. The correct id is "pushwoosh-intel-xdk-plugin". Referencing git branch is also not recommended.

P.S Missing applicationId problem was fixed in Cordova 6.0.0. So switching to this version will also help.

krisrak commented 8 years ago

intel-xdk does not currently support hooks or gradle scripts in plugins because of security reasons on our cloud build servers. So we are planning to implement 'Missing applicationId workaround' in intel-xdk via config.xml entry soon, once that is done users can use the master branch of pushwoosh.

Thanks for pushing the intel-xdk branch, we will update the featured plugin to pushwoosh-intel-xdk-plugin

shaders commented 8 years ago

It works now!