allprojects { apply plugin: 'java' compileJava { sourceCompatibility = 1.8 targetCompatibility = 1.8 options.encoding = 'UTF-8' } repositories { mavenCentral() } ext { slf4j_version = '1.7.21' spring_version = '4.2.5.RELEASE' } configurations { compile_excludeCopy compile.extendsFrom compile_excludeCopy } dependencies { /* Logger */ compile (group: 'org.slf4j', name: 'slf4j-api', version: slf4j_version) compile (group: 'org.slf4j', name: 'jcl-over-slf4j', version: slf4j_version) /* Spring */ compile (group: 'org.springframework', name: 'spring-context', version: spring_version) { exclude group: 'commons-logging' } /* Components */ compile (group: 'org.projectlombok', name: 'lombok', version: '1.16.16') } task copyDep(type: Copy) { into 'libs' from configurations.compile + configurations.runtime - configurations.compile_excludeCopy } } group 'mc' version '1.0-SNAPSHOT' apply plugin: 'application' mainClassName = "mc.core.Main" ext { log4j_version = '2.5' } dependencies { /* Logger */ runtime (group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4j_version) runtime (group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: log4j_version) /* Components */ compile (group: 'commons-io', name: 'commons-io', version: '2.6') }