apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: "io.gitlab.arturbosch.detekt"

ext {
    PUBLISH_GROUP_ID = 'io.github.architshah248.calendar'
    PUBLISH_VERSION = '2.0.0'
    PUBLISH_ARTIFACT_ID = 'awesome-calendar'     // Has to be same as your library module name
    PUBLISH_DESCRIPTION = 'Android library to select range of dates.'

    PUBLISH_URL = 'https://github.com/ArchitShah248/CalendarDateRangePicker'
    PUBLISH_LICENSE_NAME = 'Apache License'
    PUBLISH_LICENSE_URL = 'http://www.apache.org/licenses/LICENSE-2.0.txt'

    PUBLISH_DEVELOPER_ID = 'architshah248'
    PUBLISH_DEVELOPER_NAME = 'Archit Shah'
    PUBLISH_DEVELOPER_EMAIL = 'architshah248@gmail.com'
    PUBLISH_SCM_CONNECTION = 'scm:git:github.com/ArchitShah248/CalendarDateRangePicker.git'
    PUBLISH_SCM_DEVELOPER_CONNECTION = 'scm:git:ssh://github.com/ArchitShah248/CalendarDateRangePicker.git'
    PUBLISH_SCM_URL = 'https://github.com/ArchitShah248/CalendarDateRangePicker/tree/master'
}

android {
    compileSdkVersion 33

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 33

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    testOptions {
        unitTests.returnDefaultValues = true
        unitTests {
            includeAndroidResources = true
        }
    }
    namespace 'com.archit.calendardaterangepicker'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.6.0'
    implementation 'androidx.annotation:annotation:1.5.0'
    implementation 'com.android.support:support-annotations:28.0.0'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    testImplementation 'androidx.test:core:1.5.0'
    testImplementation "com.android.support.test:runner:1.0.2"
    testImplementation 'junit:junit:4.13.2'
    testImplementation "io.mockk:mockk:$mockk_version"

    androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    androidTestImplementation "io.mockk:mockk-android:$mockk_version"
}

apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"

repositories {
    mavenCentral()
}