apply plugin: 'com.android.library' apply plugin: 'robolectric' apply plugin: 'maven' apply plugin: 'findbugs' apply plugin: 'pmd' findbugs { toolVersion = "2.0.3" } dependencies { compile project(':third_party:gif_decoder') compile project(':third_party:gif_encoder') compile project(':third_party:disklrucache') compile "com.android.support:support-v4:${SUPPORT_V4_VERSION}" androidTestCompile "com.android.support:support-v4:${SUPPORT_V4_VERSION}" androidTestCompile "org.hamcrest:hamcrest-core:${HAMCREST_VERSION}" androidTestCompile "org.hamcrest:hamcrest-library:${HAMCREST_VERSION}" androidTestCompile "junit:junit:${JUNIT_VERSION}" androidTestCompile "org.mockito:mockito-all:${MOCKITO_VERSION}" androidTestCompile "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" // TODO: increase this to 2.0.+ when we compile against Java 7. androidTestCompile "com.squareup.okhttp:mockwebserver:${MOCKWEBSERVER_VERSION}" } android { compileSdkVersion COMPILE_SDK_VERSION as int buildToolsVersion BUILD_TOOLS_VERSION defaultConfig { applicationId 'com.bumptech.glide' minSdkVersion MIN_SDK_VERSION as int targetSdkVersion TARGET_SDK_VERSION as int versionCode = VERSION_CODE versionName = VERSION_NAME } } afterEvaluate { task findbugs(type: FindBugs, dependsOn: assembleDebug) { description 'Run findbugs' group 'verification' classes = fileTree('build/intermediates/classes/debug/') source = fileTree('src/main/java') classpath = files(project.configurations.compile.asPath) effort = 'max' excludeFilter = file("findbugs-exclude.xml") reports { xml.enabled = false html.enabled = true } } findbugsTestDebug { enabled = false } check.dependsOn('findbugs') task pmd(type: Pmd) { description 'Run pmd' group 'verification' // If ruleSets is not empty, it seems to contain some // defaults which override rules in the ruleset file... ruleSets = [] ruleSetFiles = files('pmd-ruleset.xml') source = fileTree('src/main/java') reports { xml.enabled = false html.enabled = true } } pmdTestDebug { enabled = false } check.dependsOn('pmd') }