Applying the MXO Plugin

Depending on you project's structure, the MXO Plugin can be applied to your project with the plugins DSL or via Legacy Plugin application.
Important: The version of the MXO Plugin {PLUGIN_VERSION} must match with the version of the MXO SDK.

Applying the Plugin with the plugins DSL

  1. Apply the Plugin in the plugins section of your top-level build.gradle.kts or build.gradle:

    plugins {
    	id("com.medallia.mxo-android-sdk-orchestration-gradle-plugin") version {PLUGIN_VERSION} apply false
    }
    plugins {
        	id 'com.medallia.mxo-android-sdk-orchestration-gradle-plugin' version {PLUGIN_VERSION} apply false
    }
  2. Add the following to the plugins section of your app-level build.gradle.kts or build.gradle:

    plugins {
        	id("com.medallia.mxo-android-sdk-orchestration-gradle-plugin")
    }
    plugins {
        	id 'com.medallia.mxo-android-sdk-orchestration-gradle-plugin'
    }
  3. Add the maven repository to the repositories section of the pluginManagement section of your settings.gradle.kts or settings.gradle:

    maven {
          	name = "MedalliaMXO"
          	url = uri("https://repository.medallia.com/artifactory/mxo-android-sdk/")
    }
    maven {
    	name 'MedalliaMXO'
    	url 'https://repository.medallia.com/artifactory/mxo-android-sdk/'
    }

Applying the Plugin via Legacy Plugin application

  1. Apply the Plugin in your app-level build.gradle.kts or build.gradle:

    apply (plugin = "com.medallia.mxo-android-sdk-orchestration-gradle-plugin")
    apply plugin: 'com.medallia.mxo-android-sdk-orchestration-gradle-plugin'
  2. Add the maven repository to the repositories section of the buildscript section of your top-level build.gradle.kts or build.gradle:

    maven {
          	name = "MedalliaMXO"
          	url = uri("https://repository.medallia.com/artifactory/mxo-android-sdk/")
    }
    maven {
    	name 'MedalliaMXO'
    	url 'https://repository.medallia.com/artifactory/mxo-android-sdk/'
    }
  3. Add the following to the dependencies section of the buildscript section of your top-level build.gradle.kts or build.gradle:

    classpath("com.medallia:mxo-android-sdk-gradle-plugins:{PLUGIN_VERSION}")
    classpath 'com.medallia:mxo-android-sdk-gradle-plugins:{PLUGIN_VERSION}'

You have now applied the Medallia Experience Orchestration Plugin to your app.