Skip to content

Configure Gradle

To use iris mock you need to add its dependency to your gradle files. You can choose to configure iris mock for entire project or just for a specific build variant:

Configuring on entire project

// add plugin to app module build.gradle.kts
plugins {
    id("dev.arildo.iris-mock-plugin") version "1.1.0-alpha04"
}
// add plugin to app module build.gradle
plugins {
    id "dev.arildo.iris-mock-plugin" version "1.1.0-alpha04"
}
Using legacy plugin application - older gradle
// build.gradle.kts
buildscript {
    repositories {
        maven { url = uri("https://plugins.gradle.org/m2/") }
    }
    dependencies {
        classpath("dev.arildo:iris-mock-plugin:1.1.0-alpha04")
    }
}

apply(plugin = "dev.arildo.iris-mock-plugin")

Configuring in a specific build variant

// add plugin to app module build.gradle.kts
plugins {
    id("dev.arildo.iris-mock-plugin") version "1.1.0-alpha04" apply false
}

buildTypes {
    debug {
        apply(plugin = "dev.arildo.iris-mock-plugin")
    }
}
// todo

You are now ready to create your own interceptors 😎

Since iris mock uses the new Transform API, it only works on AGP 4.2.0+