buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'

    }
}

apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.bmuschko.nexus'

sourceCompatibility = 1.8
jar {
    manifest {
        attributes 'Implementation-Title': 'cyclops-futurestream', 'Implementation-Version': version
    }
}

repositories {
    mavenCentral()
    jcenter()
}
configurations {
    provided
}
dependencies {
    compile project(':cyclops')
    testCompile project(':cyclops').sourceSets.test.output
    provided 'org.projectlombok:lombok:1.16.12'
    testCompile project(':cyclops').sourceSets.test.output
    testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0'
    testCompile 'org.mockito:mockito-core:1.9.5'
    testCompile 'io.projectreactor:reactor-core:3.0.7.RELEASE'
    testCompile 'org.hamcrest:hamcrest-all:1.3'
    testCompile 'com.google.guava:guava:19.0'
    testCompile 'com.google.guava:guava-testlib:19.0'
    testCompile group: 'junit', name: 'junit', version: '4.12'
    testCompile 'org.testng:testng:5.14.10'
    testCompile 'com.github.stefanbirkner:system-rules:1.10.0'
    testCompile 'io.vertx:vertx-core:3.0.0'
}
sourceSets {
    main.compileClasspath += [configurations.provided]
    test.compileClasspath += [configurations.provided]
    test.runtimeClasspath += [configurations.provided]
}

test {
    reports.html.destination = file("$buildDir/reports/test")
//  forkEvery = 1
    testLogging {
        events "started", "passed", "skipped", "failed"//, "standardOut", "standardError"
    }
}

modifyPom {
    project {
        name 'cyclops-reactive-collections'
        description 'Reactive collections'
        url 'https://github.com/aol/cyclops-react'
        inceptionYear '2017'

        groupId 'com.oath.cyclops'
        artifactId 'cyclops-reactive-collections'
        version "$version"

        scm {
            url 'scm:git@github.com:aol/cyclops-react.git'
            connection 'scm:git@github.com:aol/cyclops-react.git'
            developerConnection 'scm:git@github.com:aol/simple-react.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 'johnmcclean'
                name 'John McClean'
                email 'john.mcclean@oath.com'
            }
            developer {
                id 'kewangie'
                name 'Ke Wang'
                email 'ke.wang@teamaol.com'
            }

            developer {
                id 'tkountis'
                name 'Thomas Kountis Wang'
                email 'thomas.kountis@adtech.com'
            }
            developer {
                id 'colinfkennedy'
                name 'Colin Kennedy'
                email 'Colin.Kennedy@teamaol.com'
            }
        }
    }
}

extraArchive {
    sources = true
    tests = true
    javadoc = true
}

nexus {
    sign = true
    repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
    snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
}

