plugins {
    id 'com.android.library'
    id 'maven-publish'
}

android {
    compileSdk 31

    defaultConfig {
        minSdk 16
        targetSdk 31
        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 {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

project.afterEvaluate {
    publishing {
        publications {
            mavenJava(MavenPublication) {
                from components.release

                groupId = 'com.github.amrdeveloper'
                artifactId = 'lottiedialog'
                version = '1.0.0'
            }
        }
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.airbnb.android:lottie:4.2.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}