String mainClassName = "ru.gravit.launchserver.console.ConsoleMain" repositories { maven { url "http://repo.spring.io/plugins-release/" } } sourceCompatibility = '1.8' targetCompatibility = '1.8' jar { from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } } manifest.attributes("Main-Class": mainClassName) } dependencies { compileOnly project(':ServerWrapper') }