Created
April 30, 2015 10:20
-
-
Save z0lope0z/449e85d2486acac29437 to your computer and use it in GitHub Desktop.
Dagger 2.0 + Android Studio 1.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://siphon9.net/loune/2015/04/dagger-2-0-android-migration-tips/ | |
//http://stackoverflow.com/questions/29703480/dagger-2-and-android-studio-working-but-cant-see-generated-classes | |
apply plugin: 'com.android.application' | |
apply plugin: 'com.neenbedankt.android-apt' | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
// the latest version of the android-apt plugin | |
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' | |
} | |
} | |
android { | |
compileSdkVersion 22 | |
buildToolsVersion "21.1.2" | |
defaultConfig { | |
applicationId "com.mateuyabar.android.dagger2test" | |
minSdkVersion 22 | |
targetSdkVersion 22 | |
versionCode 1 | |
versionName "1.0" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
lintOptions { | |
abortOnError false // ignoring some references from dagger-compiler | |
} | |
} | |
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
compile 'com.android.support:appcompat-v7:22.0.0' | |
compile 'javax.inject:javax.inject:1' | |
compile 'javax.annotation:javax.annotation-api:1.2' | |
compile 'com.google.dagger:dagger:2.0' | |
apt 'com.google.dagger:dagger-compiler:2.0' | |
provided 'org.glassfish:javax.annotation:10.0-b28' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment