I want using AndroidX library and below is my Gradle setup for Butterknife
app:module Dependency
implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT'
Plugin
apply plugin: 'com.jakewharton.butterknife'
Project Dependency
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha09'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Project Repository
repositories {
google()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
jcenter()
}
First of All, I'd like to acknowledge @intellij-amiya and @Nabster valuable contribution as this answer is based on the ones they provided.
My Gradle setup is as follows
...
apply plugin: 'com.jakewharton.butterknife'
....
dependencies{
implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT'
}
...
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven {
name 'Sonatype SNAPSHOTs'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha09'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {
name 'Sonatype SNAPSHOTs'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}