/*
 * Licensed to Elasticsearch B.V. under one or more contributor
 * license agreements. See the NOTICE file distributed with
 * this work for additional information regarding copyright
 * ownership. Elasticsearch B.V. licenses this file to you under
 * the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *	http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

def versionMap = gradle.ext.versions

description = """Logstash Dependency Reporting Utility"""
version = versionMap['logstash-core']
String jacksonVersion = versionMap['jackson']

repositories {
  mavenCentral()
}

buildscript {
  repositories {
    mavenCentral()
    gradlePluginPortal()
  }
  dependencies {
    classpath "com.github.johnrengelman:shadow:${shadowGradlePluginVersion}"
  }
}

dependencies {
  implementation 'commons-io:commons-io:2.16.1'
  implementation 'org.apache.commons:commons-csv:1.7'
  implementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
  implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
  implementation "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
  testImplementation 'junit:junit:4.13.2'
}

javadoc {
  enabled = false
}

test {
  // We need to force IPV4 usage to make WireMock tests portable between *nix and Windows.
  // For details see: https://github.com/elastic/logstash/pull/8372
  jvmArgs '-Djava.net.preferIPv4Stack=true'
}

apply plugin: 'com.github.johnrengelman.shadow'

shadowJar {
  archiveBaseName = 'dependencies-report'
  archiveClassifier = null
  archiveVersion = ''
}

assemble.dependsOn shadowJar
