apply plugin: 'android-library'
apply plugin: 'maven'
apply plugin: 'signing'

version = "1.3.4"
group = "com.github.johnpersano"
artifactId = "supertoasts"


configurations {
    archives {
        extendsFrom configurations.default
    }
}

signing {
    required { has("release") && gradle.taskGraph.hasTask("uploadArchives") }
    sign configurations.archives
}

/*
uploadArchives {
    configuration = configurations.archives
    repositories.mavenDeployer {
        beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

        repository(url: sonatypeRepo) {
            authentication(userName: sonatypeUsername,
                    password: sonatypePassword)
        }

        pom.project {
            name 'SuperToasts Library'
            packaging 'aar'
            description 'Better Toasts for Android'
            url 'https://github.com/JohnPersano/SuperToasts'

            scm {
                url 'https://github.com/JohnPersano/SuperToasts'
                connection 'scm:git:git://github.com/JohnPersano/SuperToasts.git'
                developerConnection 'scm:git:git@github.com:JohnPersano/SuperToasts.git'
            }

            licenses {
                license {
                    name 'The Apache Software License, Version 2.0'
                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    distribution 'repo'
                }
            }

            developers {
                developer {
                    id 'johnpersano'
                    name 'John Persano'
                    email 'johnpersano@gmail.com'
                }
            }
        }
    }
}
*/

buildscript{

	repositories{
		mavenCentral()
	}

	dependencies{
        classpath 'com.android.tools.build:gradle:0.9.+'
	}
}

task wrapper(type: Wrapper) {
    gradleVersion = '1.10'
}

android {

	 lintOptions {  
	      abortOnError false  
	}

    compileSdkVersion 19
    buildToolsVersion "21.1.2"

	defaultConfig {
		minSdkVersion 8
		targetSdkVersion 19
	}

	sourceSets {

		main{
            java.srcDirs = ['src']
            manifest.srcFile 'AndroidManifest.xml'
            res.srcDirs = ['res']
		}

	}

}
