buildscript {
  repositories {
    jcenter()
    mavenCentral()
  }
}

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'

group = 'net.named-data.jndn-extra'
version = '1.2.0'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding = 'UTF-8'

repositories {
  jcenter()
  mavenLocal()
  mavenCentral()
  maven {
    url "https://oss.sonatype.org/content/repositories/releases/"
  }
}

sourceSets {
  integrationTest {
    java {
      srcDir 'src/integration-test/java'
      compileClasspath += main.output + test.output
      runtimeClasspath += main.output + test.output
    }
  }
}

configurations {
  integrationTestCompile.extendsFrom testCompile
  integrationTestRuntime.extendsFrom testRuntime
}

dependencies {
  compile 'com.google.guava:guava:25.1-jre'
  compile 'net.named-data:jndn:0.17'
  compile 'org.mockito:mockito-core:2.20.0'

  testCompile 'junit:junit:4.12'
  testCompile 'net.named-data.jndn-extra:jndn-mock:1.1.1'
}

task javadocJar(type: Jar) {
  classifier = 'javadoc'
  from javadoc
}

task sourcesJar(type: Jar) {
  classifier = 'sources'
  from sourceSets.main.allSource
}

task integrationTest(type: Test) {
  description 'Compile and run integration tests'
  group = 'verification'

  testClassesDirs = sourceSets.integrationTest.output.classesDirs
  classpath = sourceSets.integrationTest.runtimeClasspath

  mustRunAfter test
}

tasks.withType(Test) {
  reports.html.destination = file("${reporting.baseDir}/${name}")
  testLogging {
    events "passed", "skipped", "failed"
    showStandardStreams = true
  }
  outputs.upToDateWhen { false }
}

if (JavaVersion.current().isJava8Compatible()) {
  allprojects {
    tasks.withType(Javadoc) {
      options.addStringOption('Xdoclint:none', '-quiet')
    }
  }
}

artifacts {
  archives javadocJar, sourcesJar
}

signing {
  required { gradle.taskGraph.hasTask("uploadArchives") }
  sign configurations.archives
}

uploadArchives {
  repositories {
    mavenDeployer {
      beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

      repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
        try {
          authentication(userName: ossrhUsername, password: ossrhPassword)
        }
        catch (Exception e) {
        }
      }

      snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
        try {
          authentication(userName: ossrhUsername, password: ossrhPassword)
        }
        catch (Exception e) {
        }
      }

      pom.project {
        name 'jndn-xx utilities'
        packaging 'jar'
        description 'Collection of tools to simplify synchronous and asynchronous data transfer over the NDN network'
        url 'https://github.com/cawka/jndn-utils'

        scm {
          connection 'scm:git:https://github.com/cawka/jndn-utils'
          developerConnection 'scm:git:https://github.com/cawka/jndn-utils'
          url 'https://github.com/cawka/jndn-utils'
        }

        licenses {
          license {
            name 'GNU Lesser General Public License, Version 3.0+'
            url 'http://www.gnu.org/licenses/lgpl.html'
          }
        }

        developers {
          developer {
            id 'andrewbrown'
            name 'Andrew Brown'
            url 'https://github.com/andrewsbrown'
          }
          developer {
            id 'cawka'
            name 'Alexander Afanasyev'
            email 'aa@cs.ucla.edu'
          }
        }
      }
    }
  }
}
