apply plugin: 'com.android.library'

android {
    compileSdkVersion 33
    buildToolsVersion '30.0.3'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 33
        versionCode 103
        versionName "1.0.3"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    // https://mvnrepository.com/artifact/com.googlecode.libphonenumber/libphonenumber
    implementation group: 'com.googlecode.libphonenumber', name: 'libphonenumber', version: '8.12.32'

    api 'androidx.appcompat:appcompat:1.6.0'
}

ext {
    groupId = 'net.rimoto'
    versionId = '1.0.3'
    gitProjectUrl = "https://github.com/rimoto/IntlPhoneInput"
    gitUrl = "https://github.com/rimoto/IntlPhoneInput.git"
}

group = groupId  // Maven Group ID for the artifact
version = versionId

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

/*apply plugin: 'com.github.dcendents.android-maven'
install {
    repositories.mavenInstaller {
        // This generates POM.xml with proper parameters
        pom {
            project {
                packaging 'aar'
                groupId groupId
                artifactId "intlphoneinput"

                // Add your description here
                name "IntlPhoneInput"
                description "A custom view for Android that allows the user to enter his phone number in an elegant and friendly way."
                url gitProjectUrl

                // Set your license
                licenses {
                    license {
                        name "The Apache Software License, Version 2.0"
                        url "http://www.apache.org/licenses/LICENSE-2.0.txt"
                    }
                }
                developers {
                    developer {
                        name "Rimoto"
                    }
                }
                scm {
                    connection gitUrl
                    url gitProjectUrl
                }
            }
        }
    }
}*//*

task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'
}

task javadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}
artifacts {
    archives javadocJar
    archives sourcesJar
}*/

//apply plugin: 'com.jfrog.bintray'
/*
bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")
    configurations = ['archives']
    pkg {
        repo = 'maven'
        name = 'IntlPhoneInput'
        userOrg = "rimoto"
        licenses = ['Apache-2.0']
        publish = true
        publicDownloadNumbers = true
        vcsUrl = gitUrl
        version {
            name = versionId
            released  = new Date()
            attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
            gpg {
                sign = true
            }
        }
    }

}*/
