apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

android {
    compileSdk 33

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 33

        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility 17
        targetCompatibility 17
    }

    publishing {
        singleVariant('release') {
            withJavadocJar()
            withSourcesJar()
        }
    }

    namespace 'com.anychart'
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'androidx.appcompat:appcompat:1.6.1'
    testImplementation 'junit:junit:4.13.2'
}

afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                from components.release
                groupId = 'com.anychart'
                artifactId = 'AnyChart-Android'
                version = '1.5'
            }
        }
    }
}
