
// ********************** Spring boot overrides for better profile / debug handling OOTB ***
bootRun {
    // this is not needed for IJ, if you start a gradle task using the debug button, it will work regardless
    if (project.hasProperty('debug')) {
        jvmArgs += "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5006"
    }

    // hide all the refelction access warnings during compile
    //allow embedded executer to modify environment variables
    jvmArgs += "--add-opens=java.base/java.util=ALL-UNNAMED"
    //allow embedded executer to inject legacy types into the system classloader
    jvmArgs += "--add-opens=java.base/java.lang=ALL-UNNAMED"


    // ****************************************************
    // ************* speed optimization *******************
    // ****************************************************
    jvmArgs += "-noverify"

    // ***************************************

    // inject our application config
    // @see https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files
    systemProperty "spring.config.location", "classpath:config/,file:/etc/converter/config/"
}
