plugins {
    id "java"
    id "maven-publish"
    id "application"
}

sourceCompatibility = 1.8
group = 'com.sandbox'

application {
    mainClassName = "com.sandbox.worker.cli.CLIMain"
    applicationName = "sandbox-runtime"
    applicationDefaultJvmArgs = ["-Dfile.encoding=UTF-8"]
}

apply from:"${projectDir}/fatjar-graal.gradle"
apply from:"${projectDir}/nativeimage-graal.gradle"

repositories {
    mavenLocal()
    mavenCentral()
    maven {
        url "https://storage.googleapis.com/sandbox-maven/maven2"
    }
}

dependencies {
    annotationProcessor "io.micronaut:micronaut-graal:${micronautVersion}"
    annotationProcessor "io.micronaut:micronaut-inject-java:${micronautVersion}"
    
    implementation "org.slf4j:slf4j-api:${slfVersion}"
    implementation "ch.qos.logback:logback-classic:${logbackVersion}"
    implementation project(":worker.models.api")
    implementation project(":worker.core")
    implementation project(":worker.core-server")

    api "io.micronaut:micronaut-inject:${micronautVersion}" //this is api b/c it pull in a bunch of other stuff that we want to construct Context etc.
    api "io.micronaut:micronaut-runtime:${micronautVersion}"
    implementation "info.picocli:picocli:3.9.5"

    //testing
    testCompile project(":libs.test-utils")
    testCompile "org.junit.jupiter:junit-jupiter-api:5.4.0"
    testCompile "org.junit.jupiter:junit-jupiter-engine:5.4.0"
    testCompile "org.mockito:mockito-core:1.8.4"
    testCompile "org.hamcrest:hamcrest-all:1.3"
}

test {
    useJUnitPlatform()
}