apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'realm-android'

def keyFilePath =isMacOs() ? '/Users/angcyo/Project/y2angcyo.jks' : 'F:/angcyo/y2angcyo.jks'

android {
    signingConfigs {
        config {
            keyAlias 'angcyo'
            keyPassword 'angcyo'
            storeFile file(keyFilePath)
            storePassword 'angcyo'
        }
    }
    compileSdkVersion Integer.parseInt(R_COMPILE_SDK_VERSION)
    buildToolsVersion R_BUILD_TOOLS_VERSION
    defaultConfig {
        minSdkVersion Integer.parseInt(R_MIN_SDK_VERSION)
        targetSdkVersion Integer.parseInt(R_TARGET_SDK_VERSION)
        versionCode 1
        versionName "1.0"
        signingConfig signingConfigs.config
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
        debug {
            pseudoLocalesEnabled false
            signingConfig signingConfigs.config
        }
    }
    lintOptions {
        quiet true
        abortOnError false
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    compile project(':rlib')
}

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

    options {
        encoding "UTF-8"
        charSet 'UTF-8'
        author true
        version true
        links "http://docs.oracle.com/javase/8/docs/api"
    }
}
//
//buildscript {
//    repositories {
//        jcenter()
//    }
//    dependencies {
//        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5'
//
//        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.2.0"
//    }
//}
//apply from: 'https://raw.githubusercontent.com/angcyo/gradle-mvn-push/master/gradle-mvn-push.gradle'  //未成功

//apply from: 'https://raw.githubusercontent.com/angcyo/gradle-publish/master/bintray.gradle'  //成功
