Run gradle project as java application

18 07 2015

gradle run

is not a default task in gradle. To use it, you need to enable the ‘application’ plugin. To enable the plugin add this line to your build.gradle:

apply plugin: 'application'

This plugin requires one variable to be configured – the main class name:

mainClassName = "com.looksok.Main"

Now you can execute the

gradle clean build run

to run your app


Actions

Information

Give Your feedback:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: