apply from: "../gradle/dependencies.gradle"

group 'com.afollestad'
version versions.publishVersion

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'com.novoda.bintray-release'

sourceCompatibility = 1.7

buildscript {
    apply from: "../gradle/dependencies.gradle"

    repositories {
        jcenter()
    }
    dependencies {
        classpath "com.novoda:bintray-release:$versions.bintrayRelease"
        classpath "com.diffplug.spotless:spotless-plugin-gradle:$versions.spotlessPlugin"
    }
}

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: versions.junit
    testCompile group: 'com.google.code.gson', name: 'gson', version: versions.gson

    compile group: 'org.json', name: 'json', version: versions.json
    compile group: 'com.intellij', name: 'annotations', version: versions.intellij
}

//publish {
//    userOrg = 'drummer-aidan'
//    groupId = 'com.afollestad'
//    artifactId = 'ason-apt'
//    publishVersion = versions.publishVersion
//    website = 'https://github.com/afollestad/ason'
//}

jacocoTestReport {
    reports {
        xml.enabled true
        html.enabled false
    }
}

apply plugin: "com.diffplug.gradle.spotless"

spotless {
    java {
        target "**/*.java"
        trimTrailingWhitespace()
        removeUnusedImports()
        googleJavaFormat()
        endWithNewline()
    }
}
