buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:2.6.1")
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'application'

applicationDefaultJvmArgs = ["-Djdk.internal.httpclient.disableHostnameVerification=true"]

bootJar {
    archiveBaseName = 'doppler'
    archiveVersion = '0.14.7'
}

repositories {
    mavenCentral()
}


sourceSets {
    main {
        resources {
            exclude "**/static/node_modules/**"
        }
    }
}

sourceCompatibility = 17.0
targetCompatibility = 17.0

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-web:2.6.1") {
        exclude group: "org.apache.logging.log4j", module: "log4j-to-slf4j"
        exclude group: "org.apache.logging.log4j", module: "log4j-api"
    }
    implementation "org.springframework.boot:spring-boot-starter-data-jpa:2.6.1"

    // https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-to-slf4j
    implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.17.0'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api
    implementation 'org.apache.logging.log4j:log4j-api:2.17.0'

    // https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-activemq
    implementation "org.springframework.boot:spring-boot-starter-activemq:2.6.1"

    implementation("org.apache.activemq:activemq-stomp:5.15.12")
    implementation("org.apache.activemq:activemq-http:5.15.12")

    // https://mvnrepository.com/artifact/org.apache.velocity.tools/velocity-tools-generic
    implementation "org.apache.velocity.tools:velocity-tools-generic:3.0"
// https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-xml
    implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.3"

    // https://mvnrepository.com/artifact/org.apache.activemq/activemq-broker
    implementation "org.apache.activemq:activemq-broker:5.15.12"
    // https://mvnrepository.com/artifact/org.apache.activemq/activemq-kahadb-store
    testImplementation "org.apache.activemq:activemq-kahadb-store:5.15.12"


    // https://mvnrepository.com/artifact/mysql/mysql-connector-java
    implementation "mysql:mysql-connector-java:8.0.15"
// https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-runtime
    implementation "org.glassfish.jaxb:jaxb-runtime:2.4.0-b180830.0438"
    // https://mvnrepository.com/artifact/org.javassist/javassist
    implementation "org.javassist:javassist:3.26.0-GA"

    implementation "com.jcraft:jsch:0.1.55"

// https://mvnrepository.com/artifact/com.h2database/h2
    runtimeOnly group: 'com.h2database', name: 'h2', version: '1.4.199'

    // https://mvnrepository.com/artifact/org.mockito/mockito-core
    testImplementation 'org.mockito:mockito-core:4.2.0'


    // https://mvnrepository.com/artifact/org.jbehave/jbehave-core
    implementation "org.jbehave:jbehave-core:4.6.1"
// https://mvnrepository.com/artifact/org.jbehave.web/jbehave-web-selenium
    // https://mvnrepository.com/artifact/org.jbehave.web/jbehave-web-selenium
    implementation "org.jbehave.web:jbehave-web-selenium:4.0-beta-1"
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java
    implementation "org.seleniumhq.selenium:selenium-java:3.141.59"

    // https://mvnrepository.com/artifact/org.graalvm.sdk/graal-sdk
    implementation "org.graalvm.sdk:graal-sdk:21.3.0"
// https://mvnrepository.com/artifact/org.graalvm.truffle/truffle-api
    implementation "org.graalvm.truffle:truffle-api:21.3.0"
    // https://mvnrepository.com/artifact/org.graalvm.js/js
    implementation "org.graalvm.js:js:21.3.0"

// https://mvnrepository.com/artifact/org.graalvm.js/js-scriptengine
    implementation "org.graalvm.js:js-scriptengine:21.3.0"
// https://mvnrepository.com/artifact/org.reflections/reflections
    implementation "org.reflections:reflections:0.10.1"

    // https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-reflect
    runtimeOnly group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: '1.6.10'

    testImplementation('org.springframework.boot:spring-boot-starter-test:2.6.1')
    testImplementation('com.jayway.jsonpath:json-path:2.6.0')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

}

test {
    testLogging {
        events "passed", "skipped", "failed"
        exceptionFormat "full"
    }
}
compileKotlin {
    kotlinOptions {
        jvmTarget = "17"
    }
}
compileTestKotlin {
    kotlinOptions {
        jvmTarget = "17"
    }
}

