plugins {
  id 'java'
  id 'com.google.cloud.tools.jib' version '2.5.0'
}

group = 'io.opentelemetry'
version = '0.0.1-SNAPSHOT'

repositories {
  mavenCentral()
  jcenter()

  // this is only needed for the working against unreleased otel-java snapshots
  maven {
    url "https://oss.jfrog.org/artifactory/oss-snapshot-local"
    content {
      includeGroup "io.opentelemetry"
    }
  }
}

compileJava {
  options.release = 11
}

dependencies {
  implementation("com.linecorp.armeria:armeria-grpc:1.0.0")
  implementation("io.opentelemetry:opentelemetry-proto:0.10.0")
  implementation("org.slf4j:slf4j-simple:1.7.30")
}

jib {
  from.image = "gcr.io/distroless/java-debian10:11"
  to.image = "ghcr.io/open-telemetry/java-test-containers:smoke-fake-backend-${new Date().format("yyyyMMdd.HHmmSS")}"
}
