import org.gradle.internal.jvm.Jvm

apply plugin: 'java'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'checkstyle'
apply from: "../extra/checkstyle/checkstyle_java_library.gradle"

group = libraryGroup
version = libraryVersion

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(path: ':flowr-annotations')

    compile libraries.javaPoet
    compile libraries.autoCommon
    compile libraries.autoService

    testCompile project(':flowr-mock-classes')
    testCompile testLibraries.junit
    testCompile testLibraries.hamcrest
    testCompile testLibraries.junit
    testCompile testLibraries.mockito
    testCompile testLibraries.compileTesting
    testCompile testLibraries.googleTruth
    testCompile files(Jvm.current().getToolsJar())
}

task sourcesJar(type: Jar, dependsOn: classes) {
    classifier = 'sources'
    from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

artifacts {
    archives sourcesJar
    archives javadocJar
}

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

