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

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

group = 'com.intel.jndn.mock'
version = '1.0.0'

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

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

dependencies {
  compile 'net.named-data:jndn:0.9'
  testCompile 'junit:junit:4.12'
}

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 }
}

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/01org/jndn-mock'

        scm {
          connection 'scm:git:https://github.com/01org/jndn-mock'
          developerConnection 'scm:git:https://github.com/01org/jndn-mock'
          url 'https://github.com/01org/jndn-mock'
        }

        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'
          }
        }
      }
    }
  }
}
