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

android {
    compileSdkVersion 30
    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 30
        versionCode 3
        versionName "1.0.2"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }

    publishing {
        singleVariant("release") {}
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
}

project.afterEvaluate {
    publishing {
        publications {
            repositories.maven {
                url 'https://andob.io/repository/open_source/'
                credentials {
                    username "$System.env.MAVEN_PUBLISH_USERNAME"
                    password "$System.env.MAVEN_PUBLISH_PASSWORD"
                }
            }

            release(MavenPublication) {
                from components.release
                groupId 'ro.andob.emojilike-android'
                artifactId 'emojilike-android'
                version 'beta4'
            }
        }
    }
}
