Hi, I am trying to get off the ground with a Drop...
# gradle
s
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
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
There same groovy won't port to kotlin in that question
Copy code
run {}
Will work on groovy, not in kotlin
g
@Sasha Zimm Please check this answer, there is example of
run
task customisation and explanation why groovy-dsl
run{}
syntax doen’t work https://stackoverflow.com/questions/45747112/kotlin-and-gradle-reading-from-stdio/46662535#46662535
s
@gildor Thanks, much appriecated 🙂 Missed that when looking on SO.
g
@Sasha Zimm NP. You can vote up this my answer 🙈
s
@gildor Done. Thanks again.