description = 'micro-curator'

sourceSets {
  integTest {
    java {
      compileClasspath += main.output + test.output
      runtimeClasspath += main.output + test.output
      srcDir file('src/integration/java')
    }
    resources.srcDir file('src/integration/resources')
  }
}

task integTest(type: Test) {
  testClassesDirs = sourceSets.integTest.output.classesDirs
  classpath = sourceSets.integTest.runtimeClasspath
}

check.dependsOn integTest
integTest.dependsOn test

dependencies {
  compile 'org.apache.curator:curator-framework:' + curatorVersion
  compile 'org.apache.curator:curator-recipes:' + curatorVersion
  compile project(':micro-dist-lock')

  testCompile 'commons-io:commons-io:' + commonsIOVersion
  testCompile project(':micro-grizzly-with-jersey')
  integTestCompile sourceSets.main.output
  integTestCompile sourceSets.test.output

  integTestCompile configurations.testCompile
  integTestRuntime configurations.testRuntime
}

modifyPom {
  project {
    name 'Microserver curator integration'
    description 'Opinionated rest microservices'
    url 'https://github.com/aol/micro-server'
    inceptionYear '2015'

    groupId 'com.oath.microservices'
    artifactId 'micro-curator'
    version "$version"


    scm {
      url 'scm:git@github.com:aol/micro-server.git'
      connection 'scm:git@github.com:aol/micro-server.git'
      developerConnection 'scm:git@github.com:aol/micro-server.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 'earlzero'
        name 'Nikita Sapozhnikov'
        email 'nikita.sapozhnikov@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'
}

