
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-anym', 'Implementation-Version': version
  }
}

repositories {
    mavenCentral()
    jcenter()
}
configurations {
  provided
}
dependencies {
  compile project(':cyclops')
  compile project(':cyclops-futurestream')
    compile project(':cyclops-reactive-collections')
  compile project(':cyclops-pure')
  provided 'org.projectlombok:lombok:1.16.20'
  testCompile project(':cyclops').sourceSets.test.output
  testCompile 'io.projectreactor:reactor-core:3.0.7.RELEASE'
  testCompile group: 'junit', name: 'junit', version: '4.12'
  testCompile 'org.hamcrest:hamcrest-all:1.3'
  testCompile 'com.github.stefanbirkner:system-rules:1.10.0'
}
sourceSets {
  main.compileClasspath += [configurations.provided]
  test.compileClasspath += [configurations.provided]
  test.runtimeClasspath += [configurations.provided]
}
task packageTests(type: Jar) {
    from sourceSets.test.output
    classifier = 'tests'
}

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

artifacts.archives packageTests

modifyPom {
  project {
    name 'cyclops-anym'
    description 'A higher kinded monad abstraction for Java'
    url 'https://github.com/aol/cyclops-react'
    inceptionYear '2015'

    groupId 'com.oath.cyclops'
    artifactId 'cyclops-anym'
    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'
}

