plugins {
    id 'java-library'
    id 'maven-publish'
    id 'signing'
    id 'com.bmuschko.nexus' version '2.3.1'
}

dependencies {
    api "com.squareup.retrofit2:retrofit:$versions.retrofit"
    api "pl.droidsonroids:jspoon:${POM_VERSION}"

    testImplementation "junit:junit:$versions.junit"
    testImplementation "com.squareup.okhttp3:mockwebserver:$versions.mockwebserver"
    testImplementation "org.mockito:mockito-core:$versions.mockito"
}

group = POM_RETROFIT_GROUP
version = POM_VERSION

modifyPom {
    project {
        artifactId POM_RETROFIT_ARTIFACT_ID
        name POM_RETROFIT_NAME
        description POM_RETROFIT_DESCRIPTION
        url POM_RETROFIT_URL

        scm {
            connection POM_RETROFIT_SCM_CONNECTION_URL
            developerConnection POM_RETROFIT_SCM_CONNECTION_URL
            url POM_RETROFIT_URL
        }

        licenses {
            license {
                name 'MIT License'
                url 'https://opensource.org/licenses/MIT'
                distribution 'repo'
            }
        }

        developers {
            developer {
                id 'burnoo'
                name 'Bruno Wieczorek'
                email 'bruno.wieczorek@droidsonroids.pl'
                roles {
                    role 'developer'
                }
            }
            developer {
                id 'koral'
                name 'Karol Wrótniak'
                email 'karol.wrotniak@droidsonroids.pl'
                roles {
                    role 'developer'
                }
            }
        }
    }
}

task javadoc(type: Javadoc, overwrite: true) {
    source = sourceSets.main.allJava
    classpath += sourceSets.main.compileClasspath
    options {
        links "http://docs.oracle.com/javase/7/docs/api/"
    }
}

sourceCompatibility = "1.7"
targetCompatibility = "1.7"