apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'maven'
//apply plugin: 'com.novoda.bintray-release'
//apply plugin: 'com.github.panpf.bintray-publish'


// 发布到本地仓库配置
uploadArchives {
    repositories.mavenDeployer {
        // 配置本地仓库路径，项目根目录下的repository目录中
        repository(url: uri('../repository'))
        pom.groupId = "com.xj.android"// 唯一标识（通常为模块包名，也可以任意）
        pom.artifactId = "anchortask" // 项目名称（通常为类库模块名称，也可以任意）
        pom.version = "${anchorTaskPublicVersion}-local" // 版本号
    }
}

//
//publish {
//    userOrg = 'xujun94'
//    groupId = 'com.xj.android'
//    artifactId = 'anchortask'
//    publishVersion = "${anchorTaskPublicVersion}"
//    desc = 'anchortask'
//    website = 'https://github.com/gdutxiaoxu/anchortask'
//}


android {
    compileSdkVersion 30
    buildToolsVersion "29.0.3"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        kotlinOptions.freeCompilerArgs += ['-module-name', "com.xj.android.anchortask"]
    }

}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

}


ext {
    PUBLISH_GROUP_ID = "com.xj.android"        //项目包名
    PUBLISH_ARTIFACT_ID = 'anchortask'            //项目名
    PUBLISH_VERSION = "${anchorTaskPublicVersion}"            //版本号
}
apply from: "${rootProject.projectDir}/publish-mavencentral.gradle"


