Search Gradle plugins

com.squareup.anvil

A Kotlin compiler plugin to make dependency injection with Dagger 2 easier by automatically merging Dagger modules and component interfaces.

https://github.com/square/anvil

Sources: https://github.com/square/anvil

Add this plugin to your build using the plugins DSL:

plugins {
  id("com.squareup.anvil") version "2.0.7-SNAPSHOT"
}

See also:

  • Adding the plugin to build logic for usage in precompiled script plugins.

    See the relevant documentation for more information.

    Add this plugin as a dependency to <convention-plugins-build>/build.gradle(.kts):

    dependencies {
      implementation("com.squareup.anvil:com.squareup.anvil.gradle.plugin:2.0.7-SNAPSHOT")
    }
    It can then be applied in the precompiled script plugin:
    plugins {
      id("com.squareup.anvil")
    }
  • The legacy method of plugin application. See the relevant documentation for more information.
    buildscript {
      repositories {
        gradlePluginPortal()
      }
      dependencies {
        classpath("com.squareup.anvil:com.squareup.anvil.gradle.plugin:2.0.7-SNAPSHOT")
      }
    }
    
    apply(plugin = "com.squareup.anvil")
  • Applying plugins to all subprojects .