apply plugin: 'java-library'
apply plugin: 'kotlin'
apply from: "$rootDir/gradle/gradle-quality.gradle"

archivesBaseName = 'android-state-lint'

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

dependencies {
    // Lint dependencies
    compileOnly "com.android.tools.lint:lint-api:$lintVersion"
    compileOnly "com.android.tools.lint:lint-checks:$lintVersion"

    // Kotlin
    compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
    testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"

    testImplementation "junit:junit:$junitVersion"
    testImplementation "org.assertj:assertj-core:$assertjVersion"

    // Lint test dependencies
    testImplementation "com.android.tools.lint:lint:$lintVersion"
    testImplementation "com.android.tools.lint:lint-tests:$lintVersion"
    testImplementation "com.android.tools:testutils:$lintVersion"
}

jar {
    baseName 'com.evernote.android.state.lint'
    version '1.0'

    manifest {
        attributes 'Manifest-Version': 1.0
        attributes 'Lint-Registry': 'com.evernote.android.state.lint.registry.StateIssueRegistry'
    }

    sourceSets {
        main {
            java.srcDirs += 'src/main/kotlin'
        }
        test {
            java.srcDirs += 'src/test/kotlin'
        }
    }
}

test {
    testLogging {
        showStandardStreams = true
        exceptionFormat = 'full'
        events "passed", "skipped", "failed", "standardOut", "standardError"
    }
}