plugins {
    id 'application'
    id 'java'
    id 'org.openjfx.javafxplugin' version '0.0.9'
    id 'com.google.cloud.tools.jib' version '2.7.1'
    id 'org.jetbrains.kotlin.jvm' version '2.2.0'
}

ext {
    javaMainClass = 'core.Main'
}

group = 'xyz.lawlietbot'
version = 'latest'
sourceCompatibility = 15
targetCompatibility = 15

repositories {
    mavenCentral()
    maven { url 'https://jitpack.io' }
    maven {
        name 'm2-dv8tion'
        url 'https://m2.dv8tion.net/releases'
    }
}

dependencies {
    implementation 'net.dv8tion:JDA:6.0.0'
    implementation 'mysql:mysql-connector-java:8.0.23'
    implementation 'org.hibernate.ogm:hibernate-ogm-mongodb:5.4.1.Final'
    implementation 'org.jboss.jbossts:jbossjta:4.16.6.Final'
    implementation 'org.apache.commons:commons-dbcp2:2.9.0'
    implementation 'com.kcthota:emoji4j:6.0'
    implementation 'commons-io:commons-io:2.6'
    implementation 'org.json:json:20180813'
    implementation 'org.jsoup:jsoup:1.12.1'
    implementation 'com.vdurmont:emoji-java:5.1.1'
    implementation 'com.google.guava:guava:28.1-jre'
    implementation 'net.java.openjfx.backport:openjfx-78-backport:1.8.0-ea-b96.1'
    implementation 'org.reflections:reflections:0.9.11'
    implementation 'org.apache.commons:commons-text:1.9'
    implementation 'redis.clients:jedis:3.6.0'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0-RC2'
    implementation 'org.jetbrains.kotlin:kotlin-reflect:1.6.0-RC2'
    implementation 'com.github.Aninoss:lawliet-dashboard-components:61230f86c5'
    implementation "com.deepl.api:deepl-java:1.6.0"

    implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.1'
    implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.1'
    implementation 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.12.5'
    implementation 'com.fasterxml.jackson.core:jackson-core:2.12.5'
    implementation 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.12.5'
    implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jaxrs:2.12.5'
    implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.5'
    implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.5'

    implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359'
    implementation 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1'
    implementation 'com.sun.xml.bind:jaxb-impl:3.0.1'
    implementation 'org.glassfish.jersey.media:jersey-media-moxy:3.0.2'

    implementation 'org.glassfish.grizzly:grizzly-http-server:3.0.0'
    implementation 'org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.0.2'
    implementation 'org.glassfish.jersey.containers:jersey-container-grizzly2-servlet:3.0.2'
    implementation 'org.glassfish.jersey.inject:jersey-hk2:3.0.2'
    implementation 'org.glassfish.hk2:hk2-metadata-generator:3.0.2'

    /* logging */
    implementation 'ch.qos.logback:logback-classic:1.5.6'
    implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.23.1'
}

jib {
    from {
        image = 'adoptopenjdk:15.0.2_7-jdk-openj9-0.24.0'
    }
}

jar {
    manifest {
        attributes 'Main-Class': javaMainClass
    }
}