plugins {
    id 'com.android.library'
    id 'com.novoda.static-analysis' version '1.2'
    id "com.github.spotbugs" version '3.0.0'
}

group = 'com.github.eggheadgames'

android {
    compileSdkVersion rootProject.ext.general.compileSdkVersion
    buildToolsVersion rootProject.ext.general.buildToolsVersion

    defaultConfig {
        minSdkVersion rootProject.ext.general.minSdkVersion
        targetSdkVersion rootProject.ext.general.targetSdkVersion
        versionCode rootProject.ext.general.versionCode
        versionName rootProject.ext.general.versionName
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        warningsAsErrors true
        disable 'GradleDependency'
        disable 'OldTargetApi'
    }
}

dependencies {
    api 'com.github.daniel-stoneuk:material-about-library:3.1.2'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
}

staticAnalysis {
    penalty {
        maxErrors = 0
        maxWarnings = 0
    }
    pmd {
        ignoreFailures = false
        reportsDir = file("$project.buildDir/outputs/")
    }
    spotbugs {
        ignoreFailures = false
        reportsDir = file("$project.buildDir/outputs/")
        reportLevel = "medium"
        effort = "max"

        excludeFilter rootProject.file('library/findbugs_excludes.xml')
    }
}