Java Spark project: Configuration "Application" or "Gradle"?

Answered

Hello,

I recently opened a project that a colleague started.

It's Java Spark framework using Gradle.

When I opened this new project, for the first time, in IntelliJ, the default configuration was called "Main" and it was an "Application" type:

(I had to add the "use classpath of module")

I have recently setup two other projects in past, and when I setup the "configuration" I chose "gradle". For example:

I'm curious, what way is best to setup a gradle project?

Coincidently, I like the "Application" configuration because it appears to build way faster than gradle config, and it doesn't start two processes when running.

The drawback I can see to Application config, is there's not place to specify "tasks" like "clean" and "run".

Sorry if basic question. I'm pretty new to java dev.

0
2 comments

IntelliJ IDEA can either build and run the project itself or delegate these actions to Gradle. In some cases the project will build and run properly only with the delegation (in case of some complex configuration of your build scripts that IntelliJ IDEA doesn't understand and cannot convert to its internal build and run actions). So, it's up to you which way to use.

http://mrhaki.blogspot.ru/2016/11/gradle-goodness-delegate-build-and-run.html .

1
Avatar
Permanently deleted user

Ahhhh, I see!

I'm really liking the "Application" configuration as it’s 10 times faster to run when compared to gradle config (part of it is my machine).

I'll stick with Application config as it's working without a hitch.

Thanks for link, reading now!

I really appreciate the help!!!!

0

Please sign in to leave a comment.