I have the following build.gradle
file:
apply plugin:'application'
mainClassName = "MyMain"
allprojects {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.jsoup:jsoup:1.8.3'
}
So when I do gradle run
it works perfectly, it uses jsoup and so.
Now, I've imported this project at my Intellij Idea IDE, I created a gradle build run/debug configuration, so when I press the green arrow 'run', it's building the application, but not running it, so I guess it's executing gradle build
.
I've searched for an way to run the application, and the Intellij Idea says that I must create a new Application run/debug configuration. I did it, told where my main class was, but when I click run, it tries to make the source code, and claims that it can't find Jsoup for compiling.
How can I mimic gradle run
in intellij idea's IDE?
Open the gradle window in Intellij. View->Tool Windows->Gradle.
On the right hand side you will see a list of all your gradle tasks. Double click to run or right click and assign a shortcut to any of them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With