plugins {
  id 'java'
  id 'maven-publish'
  id 'distribution'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

tasks.withType(JavaCompile) { options.encoding = "UTF-8" }

ext.libraries = [
  bcprov: 'org.bouncycastle:bcprov-jdk15on:1.70',
  bcpkix: 'org.bouncycastle:bcpkix-jdk15on:1.70',
  junit: 'junit:junit:4.13.2',
  netty_codec_http: 'io.netty:netty-codec-http:4.1.72.Final',
  netty_transport: 'io.netty:netty-transport:4.1.72.Final',
  netty_handler: 'io.netty:netty-handler:4.1.72.Final',
  netty_buffer: 'io.netty:netty-buffer:4.1.72.Final',
  netty_common: 'io.netty:netty-common:4.1.72.Final',
  rhino: 'org.mozilla:rhino:1.7.13',
  slf4j_api: 'org.slf4j:slf4j-api:1.7.32',
  slf4j_simple: 'org.slf4j:slf4j-simple:1.7.32'
]

publishing {
  publications {
    mavenJava(MavenPublication) {
      pom {
        name = 'trireme'
        description = 'Trireme -- Embed Node.js programs inside the Java Virtual Machine'
        url = 'http://apigee.io/'
        licenses {
          license {
            name = 'MIT License'
            url = 'http://opensource.org/licenses/MIT'
          }
        }
        // TODO Developers
  
        scm {
          connection = 'scm:git:https://github.com/apigee/trireme.git'
          developerConnection = 'scm:git:ssh://git@github.com/apigee/trireme.git'
          url = 'git@github.com:apigee/trireme.git'
        }
      }
    }
  }
}

allprojects {
  test {
    useJUnit()
    failFast = false
    maxParallelForks = 16
  }
  repositories {
    mavenCentral()
  }
}