dependencies {
    api project(":worker.models.api")
    api project(":libs.jliquid")

    api "org.slf4j:slf4j-api:${slfVersion}"
    api "commons-io:commons-io:2.6"
    api "org.apache.commons:commons-lang3:3.2"
    
    //graal
    api "org.graalvm.sdk:graal-sdk:${graalvmVersion}"
    api "org.graalvm.js:js:${graalvmVersion}"
    api "org.graalvm.truffle:truffle-api:${graalvmVersion}"
    api "org.graalvm.regex:regex:${graalvmVersion}"
    api "com.ibm.icu:icu4j:${icu4jVersion}"

    //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"
}

def xmlResources = copySpec {
    //we need to do this because https://github.com/oracle/graal/issues/1606
    from(zipTree("${org.gradle.internal.jvm.Jvm.current().javaHome}/jre/lib/resources.jar")) {
        include "com/sun/org/apache/xml/internal/serializer/**.properties"
    }
}

jar {
    with xmlResources
}

test {
    useJUnitPlatform()
}