Hi,
I am trying to get off the ground with a Dropwizard skeleton building and running with Gradle via the Kotlin DSL.
I want to run up the application using a common approach such as: https://stackoverflow.com/questions/28610015/run-main-method-using-gradle-run-task
My run block in Intellij is giving me hassle as it does not want to recognise the args as in the link above. It also seems to think the run {} is some funky Kotlin function.
Any ideas please?
n
napperley
11/25/2017, 10:09 PM
In the build.gradle.kts file include application in the plugins block, and do a Gradle refresh. After the refresh add a new application block, and set the mainClass property (example value: org.example.app.MainKt).
m
mkobit
11/25/2017, 10:59 PM
There same groovy won't port to kotlin in that question
mkobit
11/26/2017, 12:57 AM
Copy code
run {}
Will work on groovy, not in kotlin
g
gildor
11/27/2017, 4:57 AM
@Sasha Zimm Please check this answer, there is example of