Ok, this is probably the most stupid question I've ever asked but I really need to know why this is happening.
I've built my own annotation processor for android. Now, these are my dependencies on my build.gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// Retrofit
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
// Butterknife dependencies
apt 'com.jakewharton:butterknife-compiler:8.0.1'
compile 'com.jakewharton:butterknife:8.0.1'
// Support libraries
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
// My annotation processor
apt 'co.aurasphere.revolver:revolver-compiler:0.0.1-SNAPSHOT'
compile 'co.aurasphere.revolver:revolver:0.0.1'
}
This build works fine. The annotation processor is called and I can see it running.
Now, if I do this instead:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// Butterknife dependencies
apt 'com.jakewharton:butterknife-compiler:8.0.1'
compile 'com.jakewharton:butterknife:8.0.1'
// Support libraries
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
// Retrofit
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
// My annotation processor
apt 'co.aurasphere.revolver:revolver-compiler:0.0.1-SNAPSHOT'
compile 'co.aurasphere.revolver:revolver:0.0.1'
}
I've just moved the Retrofit dependency before my annotation processor. Suddenly it stops showing any life signs during the build. This only happens if my annotation processor is the last dependency and Retrofit is just before it. If my annotation processor is the second (still after Retrofit) it works. If it's the last dependency and Retrofit is not the dependency just before it, it works.
I'm really confused. I could understand if the problem was with Butterknife since it's another annotation processor, but this seems really strange.
Obviously, is not a real problem but I'm really curious to know why this is happening.
Thank you.