plugins {
    id 'com.android.library'
    id("com.vanniktech.maven.publish") version "0.29.0"
}
import com.vanniktech.maven.publish.SonatypeHost

mavenPublishing {
    publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)

    signAllPublications()

    pom {
        name = "material-hijri-calendarview"
        description = "A Material design back port of Android\'s Hijri CalendarView. The goal is to have a Material look and feel, rather than 100% parity with the platform\'s implementation."
        inceptionYear = "2016"
        url = "https://github.com/eltohamy/material-hijri-calendarview/"
        licenses {
            license {
                name = "The Apache License, Version 2.0"
                url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
                distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
            }
        }
        developers {
            developer {
                id = "eltohamy"
                name = "Eltohamy Abdelmoaty"
                url = "https://github.com/eltohamy"
            }
        }
        scm {
            url = "https://github.com/username/mylibrary/"
            connection = "scm:git:git://github.com/eltohamy/material-hijri-calendarview.git"
            developerConnection = "scm:git:ssh://git@github.com/eltohamy/material-hijri-calendarview.git"
        }
    }
}

ext {
    bintrayRepo = 'maven'
    bintrayName = 'material-hijri-calendarview'

    publishedGroupId = 'io.github.eltohamy'
    libraryName = 'material-hijri-calendarview'
    artifact = 'material-hijri-calendarview'

    libraryDescription = 'A Material design back port of Android\'s Hijri CalendarView. The goal is to have a Material look and feel, rather than 100% parity with the platform\'s implementation.'

    siteUrl = 'https://github.com/eltohamy/material-hijri-calendarview'
    gitUrl = 'hhttps://github.com/eltohamy/material-hijri-calendarview.git'

    libraryVersion = '1.1.3'

    developerId = 'eltohamy'
    developerName = 'El-Tohamy Allam'
    developerEmail = 'tohamy_allam@yahoo.com'

    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}
android {
    namespace = "com.github.eltohamy.materialhijricalendarview"
    compileSdk = 34

    defaultConfig {
        minSdkVersion 23
        targetSdk 34
        versionCode project.ext.versionCodeInt
        versionName version
    }
}

dependencies {
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation group: 'com.github.msarhan', name: 'ummalqura-calendar', version: '2.0.2'
    implementation "androidx.annotation:annotation:1.8.2"
    testImplementation 'junit:junit:4.13.2'
}