plugins {
    id "com.jfrog.bintray" version "1.7"
    id "com.github.dcendents.android-maven" version "1.4.1"
}
apply plugin: 'com.android.library'


group = 'blue.aodev'
//artifact name = module name (material-values)
version = '1.1.1'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.3"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 4
        versionName "1.1.1"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        template {

        }
    }
    sourceSets {
        main.res.srcDirs = ['src/main/res-style', 'src/main/res-layout', 'src/main/res-component']
        template.res.srcDirs = main.res.srcDirs << 'src/template/res'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}


bintray {
    Properties properties = new Properties()
    properties.load(project.rootProject.file('local.properties').newDataInputStream())

    user = properties.getProperty('bintrayUser')
    key = properties.getProperty('bintrayApiKey')

    pkg {
        repo = 'maven'
        name = 'material-values'

        version {
            name = '1.1.1'
        }
    }
    configurations = ['archives']
}

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

artifacts {
    archives sourcesJar
}
