How to run Kotlin application in Gradle task and not wait exit code to success finish task?

Viewed 43

I need to run Kotlin BackEnd application in Gradle task and after it run auto tests application. So I created 2 tasks: runApp and runAutoTests (runAutoTests dependsOn runApp). But runApp do not return exit code, because it is not finish(It is Spring application). And runAutoTests never start.

val runApp by tasks.registering(JavaExec::class) {
    mainClass = "myApp"
}

val runAutoTests by tasks.registering(YarnTask::class) {
    dependsOn("runApp")
    ...
}

Is there any way to wait until my runApp is start and then run another task (Without waiting exit code)?

0 Answers
Related