AnsweredAssumed Answered

Cordova 5.1.1+ CA MAA 15.2.1p4 android native integration (gradle)

Question asked by tbeal on Dec 9, 2015
Latest reply on Dec 15, 2015 by Hallett_German

Hi helpful individuals,


I managed to get CA MAA working with the gradle build, however everything had to be inserted at the end of the build.gradle file. This is a file that is autogenerated by cordova during a prepare/ build/ platform add and should not be modified. There are basically two ways of including an additional build code: through build-extras.gradle or by supplying an additional gradle file per plugin. When attempting to integrate the CA MAA gradle wrapper, I found that the only way my builds didn't fail was by adding the buildscript{} and afterEvaluate{} closures to the end of build.gradle, and then adding the apply plugin after those two closures. This works, but it means I have to do some dirty things in the build process to append the build.gradle file with the proper build code for integrating the CA MAA wrapper. If I put the exact same code inside build-extras or a plugin provided .gradle file, the script fails on "ca-maa-wrapper-plugin" not found. I'm sure this has something to do with my lack of gradle-fu, but I'm stuck at this point.


Any ideas? I'd ultimately like to package the CA MAA jar file and associated gradle code in its own cordova plugin.