Cordova Plugin - Hooks not firing

I am trying to import a Cordova Plugin that has some hooks defined on plugin.xml

  <hook src="scripts/update-platform.js" type="after_prepare"/>
  <hook src="scripts/close-log.js" type="after_build"/>
  <hook src="scripts/close-log.js" type="after_run"/>

And specificly for android, I have the hooks:


    <hook src="scripts/update-build-android.js" type="after_compile"/>
    <hook src="scripts/update-build-android.js" type="before_deploy"/>


These hooks fire just fine when I build an app using cordova cli, but when I build the native app using Outsystems none of the hooks are firing. I really need the hooks to fire.


The cordova plugin is this: https://www.npmjs.com/package/dynatrace-cordova-plugin


I already created a module that encapsulates the plugin, and added it as a dependency, and I am able to build the app just fine. Please do not point me to the plugins documentation because I've read both pages about 20 times each, as you can see here, the app builds but the hooks are not invoked.


 [2019-11-30T00:56:59.848Z] [INFO] Start processing job request...
[2019-11-30T00:56:59.850Z] [INFO] Start generating application...
[2019-11-30T00:56:59.850Z] [INFO] Template version: 5.1.13
[2019-11-30T00:56:59.850Z] [INFO] Build features: cordovaNoFetch - true
[2019-11-30T00:56:59.850Z] [INFO] Build features: buildTimeout - 20
[2019-11-30T00:56:59.851Z] [INFO] Creating a temporary folder for the application...
[2019-11-30T00:56:59.851Z] [INFO] Creating the required directory structure for your cordova application...
[2019-11-30T00:57:03.682Z] [INFO] Getting application resources...
[2019-11-30T00:57:03.691Z] [INFO] Processing application resources...
[2019-11-30T00:57:03.826Z] [INFO] Generating application assets...
[2019-11-30T00:57:04.345Z] [INFO] Applying configurations in the config.xml file...
[2019-11-30T00:57:04.354Z] [INFO] Applying advanced configurations in the config.xml file...
[2019-11-30T00:57:04.354Z] [INFO] Applying custom application icons...
[2019-11-30T00:57:04.354Z] [INFO] Applying custom application splashscreens...
[2019-11-30T00:57:04.354Z] [INFO] Applying application preferences...
[2019-11-30T00:57:04.355Z] [INFO] Applying application accessList...
[2019-11-30T00:57:04.355Z] [INFO] Adding target platform...
[2019-11-30T00:57:42.005Z] [INFO] Applying plugins in the config.xml file...
[2019-11-30T00:57:42.006Z] [INFO] Plugin Id: dynatrace-cordova-outsystems-plugin
[2019-11-30T00:57:42.006Z] [INFO] Plugin Action: add
[2019-11-30T00:57:48.361Z] [INFO] Getting signing keys...
[2019-11-30T00:57:48.401Z] [INFO] Building application package...
[2019-11-30T00:58:48.666Z] [INFO] Checking application package...
[2019-11-30T00:58:48.666Z] [INFO] Remove debug/release signing properties
[2019-11-30T00:58:48.667Z] [INFO] Zipping application source code...
[2019-11-30T00:59:30.282Z] [INFO] Saving package and source files...
[2019-11-30T00:59:30.362Z] [INFO] Removing temporary folder...
[2019-11-30T00:59:31.816Z] [INFO] Application was successfully generated!
[2019-11-30T00:59:31.819Z] [INFO] Execution time: 152011ms


Any reason why these hooks don't fire? And any way I can make them fire? I cannot afford to rewrite this complex plugin and my entire app just because these do not fire.


Thanks

Is it making the build?

Swatantra Kumar wrote:

Is it making the build?

Yes I even posted the build log..


O yeah. My bad. It's red texted.

Is there a way to run these hooks? Or maybe invoke scripts after the plugin is added but before the apk is built?