<?xml version="1.0" encoding="utf-8"?>

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
        id="cordova-talsec-plugin-freerasp"
        version="9.0.0">

  <name>freerasp</name>
  <author>Talsec (info@talsec.app)</author>
  <description>Cordova plugin for improving app security and threat monitoring on Android and iOS mobile devices.</description>
  <keywords>cordova,cordova-plugin,cordova-libraries,freerasp,security,tampering-detection,root-detection,app-shielding,rasp,tampering,reverse-engineering,application-security,frida</keywords>
  <license>MIT</license>
  <repo>https://github.com/talsec/Free-RASP-Cordova</repo>
  <issue>https://github.com/talsec/Free-RASP-Cordova/issues</issue>


  <engines>
    <engine name="cordova" version=">=9.0.0"/>
  </engines>

  <asset src="www/dist/talsec.js" target="js/talsec.js"/>

  <js-module src="www/dist/talsec.js" name="talsec">
    <clobbers target="talsec" />
  </js-module>

  <platform name="android">
    <config-file target="res/xml/config.xml" parent="/*">
      <preference name="GradlePluginKotlinEnabled" value="true" />
      <preference name="GradlePluginKotlinCodeStyle" value="official" />
      <preference name="GradlePluginKotlinVersion" value="2.1.0" />
      <feature name="TalsecPlugin">
        <param name="android-package" value="com.aheaditec.talsec.cordova.TalsecPlugin"/>
      </feature>
    </config-file>
    <source-file src="src/android/TalsecPlugin.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/"/>
    <source-file src="src/android/ScreenProtector.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/"/>
    <source-file src="src/android/TalsecThreatHandler.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/"/>
    <source-file src="src/android/models/CordovaSuspiciousAppInfo.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/models/"/>
    <source-file src="src/android/utils/Extensions.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/utils/"/>
    <source-file src="src/android/utils/Utils.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/utils/"/>
    <source-file src="src/android/utils/ScreenCaptureStatus.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/utils/"/>
    <source-file src="src/android/utils/RandomGenerator.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/utils/"/>
    <source-file src="src/android/events/BaseRaspEvent.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/events/"/>
    <source-file src="src/android/events/RaspExecutionStateEvent.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/events/"/>
    <source-file src="src/android/events/ThreatEvent.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/events/"/>
    <source-file src="src/android/dispatchers/ThreatDispatcher.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/dispatchers/"/>
    <source-file src="src/android/dispatchers/ExecutionStateDispatcher.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/dispatchers/"/>
    <source-file src="src/android/interfaces/PluginThreatListener.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/interfaces/"/>
    <source-file src="src/android/interfaces/PluginExecutionStateListener.kt" target-dir="app/src/main/kotlin/com/aheaditec/talsec/cordova/interfaces/"/>
    <framework src="src/android/talsec.gradle" custom="true" type="gradleReference" />
  </platform>
  
  <platform name="ios">
    <config-file target="config.xml" parent="/*">
      <feature name="TalsecPlugin">
        <param name="ios-package" value="TalsecPlugin"/>
      </feature>
    </config-file>
    <header-file src="src/ios/TalsecBridging-Header.h" />
    <source-file src="src/ios/models/RaspExecutionStates.swift" />
    <source-file src="src/ios/models/SecurityThreat.swift" />
    <source-file src="src/ios/utils/EventIdentifiers.swift" />
    <source-file src="src/ios/utils/RandomGenerator.swift" />
    <source-file src="src/ios/utils/ScreenCaptureStatus.swift" />
    <source-file src="src/ios/utils/Utils.swift" />
    <source-file src="src/ios/dispatchers/ThreatDispatcher.swift" />
    <source-file src="src/ios/dispatchers/ExecutionStateDispatcher.swift" />
    <source-file src="src/ios/TalsecPlugin.swift" />
    <framework src="src/ios/TalsecRuntime.xcframework" custom="true" embed="true" />
  </platform>
</plugin>
