apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

buildscript {
    repositories {
        jcenter()
    }

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

sourceCompatibility = 1.8

jar {
    manifest {
        attributes 'Implementation-Title': 'Cyclops Reactor', 'Implementation-Version': version
    }
}

repositories {
    mavenCentral()
}

configurations {
    provided
    doc {
        transitive false
    }
    testArtifacts.extendsFrom testRuntime
}

dependencies {
    api project(':cyclops')
    api project(':cyclops-pure')
    api project(':cyclops-anym')
    api project(':cyclops-futurestream')
    api project(':cyclops-reactive-collections')
    api 'io.projectreactor:reactor-core:' + reactorVersion
    testImplementation project(':cyclops-anym').sourceSets.test.output
    testImplementation project(':cyclops').sourceSets.test.output
    compileOnly group: 'org.projectlombok', name: 'lombok', version: lombokVersion

    testImplementation 'commons-io:commons-io:2.4'
    testImplementation group: 'junit', name: 'junit', version: '4.12'
    testImplementation group: 'junit', name: 'junit', version: '4.12'
    testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
    testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
    testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.0'
    testImplementation 'org.assertj:assertj-core:3.2.0'
    testImplementation 'com.github.stefanbirkner:system-rules:1.10.0'
    testImplementation(group: 'org.hibernate', name: 'hibernate-core', version: '5.1.0.Final')
    testImplementation (group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.1.0.Final')
}


test {
    systemProperties 'property': 'value'
}

javadoc {
    source configurations.doc.collect { zipTree(it) }
    include '**/*.java'
    options.addStringOption('Xdoclint:none', '-quiet')
}

task packageTests(type: Jar) {
    from sourceSets.test.output
    classifier = 'tests'
}
test {
    reports.html.destination = file("$buildDir/reports/test")
    forkEvery = 100
    testLogging {
        events "started", "passed", "skipped", "failed"//, "standardOut", "standardError"
    }
}

artifacts {
    testArtifacts packageTests
}

