/*
 * Copyright (c) 2021.
 *
 * This file is part of DiscoAPI.
 *
 *     DiscoAPI is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 2 of the License, or
 *     (at your option) any later version.
 *
 *     DiscoAPI is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DiscoAPI.  If not, see <http://www.gnu.org/licenses/>.
 */

plugins {
    id ("com.github.johnrengelman.shadow") version "8.1.1"
    id ("io.micronaut.application") version "3.7.8"
    id ("com.gorylenko.gradle-git-properties") version "2.4.1"
}

version "1.0"
group "io.foojay"

repositories {
    mavenCentral()
}

micronaut {
    runtime ("netty")
    testRuntime ("junit5")
    processing {
        incremental (true)
        annotations ("io.foojay.*")
    }
}

dependencies {
    annotationProcessor ("io.micronaut:micronaut-inject-java")
    annotationProcessor ("io.micronaut:micronaut-http-validation")
    annotationProcessor ("io.micronaut:micronaut-validation")
    annotationProcessor ("io.micronaut.openapi:micronaut-openapi")

    implementation ("io.micronaut:micronaut-inject")

    implementation("io.micronaut:micronaut-management")
    implementation("io.micronaut:micronaut-validation")
    implementation("io.micronaut:micronaut-runtime")
    implementation("io.micronaut:micronaut-http-client")
    implementation("io.micronaut:micronaut-inject-java")
    implementation("io.micronaut.beanvalidation:micronaut-hibernate-validator")
    implementation("com.google.code.gson:gson:2.10.1")
    implementation("io.swagger.core.v3:swagger-annotations")
    implementation("org.mongodb:mongodb-driver-sync:4.9.1")

    implementation("io.micronaut.micrometer:micronaut-micrometer-core")
    implementation("io.micronaut:micronaut-management")
    implementation("io.micronaut.micrometer:micronaut-micrometer-registry-prometheus")

    implementation ('eu.hansolo:jdktools:17.0.27')

    implementation ('com.hivemq:hivemq-mqtt-client:1.3.1')

    implementation("org.yaml:snakeyaml:2.0")

    implementation("net.javacrumbs.shedlock:shedlock-micronaut:5.2.0")
    implementation("net.javacrumbs.shedlock:shedlock-provider-mongo:5.2.0")

    implementation("org.slf4j:slf4j-api:2.0.7")
    implementation("ch.qos.logback:logback-core:1.4.7")
    implementation("ch.qos.logback:logback-classic:1.4.7")
}

mainClassName = "io.foojay.Application"
java {
    sourceCompatibility = JavaVersion.toVersion('17')
    targetCompatibility = JavaVersion.toVersion('17')
}
