apply plugin: 'idea'
apply plugin: 'eclipse'

group = '{{groupId}}'
version = '{{artifactVersion}}'

repositories {
    maven { url "https://repo1.maven.org/maven2" }
    jcenter()
}

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

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

install {
    repositories.mavenInstaller {
        pom.artifactId = '{{artifactId}}'
    }
}

task execute(type:JavaExec) {
   main = System.getProperty('mainClass')
   classpath = sourceSets.main.runtimeClasspath
}

ext {
    swagger_annotations_version = "1.5.21"
    jackson_version = "2.10.5"
    jackson_databind_version = "2.10.5.1"
    vertx_version = "3.4.2"
    junit_version = "4.13.1"
    {{#openApiNullable}}
    jackson_databind_nullable_version = "0.2.1"
    {{/openApiNullable}}
    {{#threetenbp}}
    jackson_threeten_version = "2.9.10"
    {{/threetenbp}}
}

dependencies {
    implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
    implementation "com.google.code.findbugs:jsr305:3.0.2"
    implementation "io.vertx:vertx-web-client:$vertx_version"
    implementation "io.vertx:vertx-rx-java:$vertx_version"
    implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
    implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
    implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
    {{#joda}}
    implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
    {{/joda}}
    {{#java8}}
    implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
    {{/java8}}
    {{#threetenbp}}
    implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:jackson_threeten_version"
    {{/threetenbp}}
    {{#openApiNullable}}
    implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
    {{/openApiNullable}}
    implementation 'javax.annotation:javax.annotation-api:1.3.2'
    testImplementation "junit:junit:$junit_version"
    testImplementation "io.vertx:vertx-unit:$vertx_version"
}
