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

plugins {
  id 'java'
  id 'maven'
  id 'signing'
  //id 'checkstyle'
  id 'org.sonarqube' version '2.8'
  id 'net.saliman.cobertura' version '3.0.0'
}

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

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

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

configurations {
  checkstyleConfig
}

dependencies {
  compile 'net.named-data:jndn:0.17'

  testCompile 'junit:junit:4.12'
  testRuntime 'org.slf4j:slf4j-api:1.7.25'

  checkstyleConfig "com.puppycrawl.tools:checkstyle:8.11"
}

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

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

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

tasks.withType(Checkstyle) {
  checkstyleClasspath = project.configurations.checkstyleConfig
  checkstyleTest {
    configFile file('config/checkstyle/checkstyle-test.xml')
  }
}

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-mock'
        packaging 'jar'
        description 'Tools for testing NDN Java code without using network IO'
        url 'https://github.com/named-data/jndn-mock'

        scm {
          connection 'scm:git:https://github.com/named-data/jndn-mock.git'
          developerConnection 'scm:git:ssh://git@github.com/named-data/jndn-mock.git'
          url 'https://github.com/named-data/jndn-mock'
        }

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

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

cobertura {
  coverageFormats = ['html', 'xml']
}
