apply plugin: 'java' apply plugin: 'eclipse' version = '1.0' dependencies { compile fileTree(dir: 'lib', include: '*.jar') runtime fileTree(dir: 'lib', include: '*.jar') testCompile group: 'junit', name: 'junit', version: '4.+' } jar { copy { from configurations.compile into 'app/lib' } def manifestClasspath = configurations.compile.collect{ 'lib/' + it.getName() }.join(' ') manifest { attributes 'Implementation-Title': 'Gradle Quickstart' attributes 'Implementation-Version': version attributes 'Main-Class' : 'org.gradle.GradleMain' attributes 'Class-Path': manifestClasspath } from (configurations.compile.resolve().collect { it.isDirectory() ? it : fileTree(it) }) { exclude 'META-INF/MANIFEST.MF' exclude 'META-INF/*.SF' exclude 'META-INF/*.DSA' exclude 'META-INF/*.RSA' exclude '**/*.jar' } destinationDir = file('app') archiveName = 'GradleTest.jar' } repositories { mavenCentral() } test { systemProperties 'property': 'value' }