apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion "22.0.1"

    defaultConfig {
        minSdkVersion 4
        targetSdkVersion 21
    }
    
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_6
    }
}

version = "1.0.0." + (new Date()).format('yyyyMMddHHmm')
group = "eu.chainfire"

dependencies {
}

task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'
}

task javadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

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

artifacts {
    archives javadocJar
    archives sourcesJar
}

task findConventions << {
    println project.getConvention()
}
