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

android {
    compileSdkVersion buildConfig.compileSdk
    defaultConfig {
        minSdkVersion buildConfig.minSdk
        targetSdkVersion buildConfig.targetSdk
        consumerProguardFiles 'consumer-rules.pro'
    }
    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

dependencies {
    implementation libs.kotlin.stdlib
    implementation libs.androidx.appcompat
}

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

                group = 'com.github.fornewid'
                artifactId = 'neumorphism'
                version = '0.3.2'

                pom {
                    name = 'Neumorphism'
                    description = 'Try to Neumorphism designs in Android.'
                    url = 'https://github.com/fornewid/neumorphism'
                    licenses {
                        license {
                            name = 'The Apache License, Version 2.0'
                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                        }
                    }
                    developers {
                        developer {
                            id = 'fornewid'
                            name = 'SOUP'
                        }
                    }
                    scm {
                        connection = 'scm:git@github.com/fornewid/neumorphism.git'
                        developerConnection = 'scm:git@github.com/fornewid/neumorphism.git'
                        url = 'https://github.com/fornewid/neumorphism'
                    }
                }
            }
        }
    }
}
