342
|
1 apply plugin: 'java'
|
|
2 apply plugin: 'eclipse'
|
|
3
|
|
4 version = '1.0'
|
|
5
|
|
6 dependencies {
|
|
7 compile fileTree(dir: 'lib', include: '*.jar')
|
|
8 runtime fileTree(dir: 'lib', include: '*.jar')
|
|
9 testCompile group: 'junit', name: 'junit', version: '4.+'
|
|
10 }
|
|
11
|
|
12 jar {
|
|
13 copy {
|
|
14 from configurations.compile
|
|
15 into 'app/lib'
|
|
16 }
|
|
17
|
|
18 def manifestClasspath = configurations.compile.collect{ 'lib/' + it.getName() }.join(' ')
|
|
19 manifest {
|
|
20 attributes 'Implementation-Title': 'Gradle Quickstart'
|
|
21 attributes 'Implementation-Version': version
|
|
22 attributes 'Main-Class' : 'org.gradle.GradleMain'
|
|
23 attributes 'Class-Path': manifestClasspath
|
|
24 }
|
|
25
|
|
26 from (configurations.compile.resolve().collect { it.isDirectory() ? it : fileTree(it) }) {
|
|
27 exclude 'META-INF/MANIFEST.MF'
|
|
28 exclude 'META-INF/*.SF'
|
|
29 exclude 'META-INF/*.DSA'
|
|
30 exclude 'META-INF/*.RSA'
|
|
31 exclude '**/*.jar'
|
|
32 }
|
|
33
|
|
34 destinationDir = file('app')
|
|
35 archiveName = 'GradleTest.jar'
|
|
36 }
|
|
37
|
|
38 repositories {
|
|
39 mavenCentral()
|
|
40 }
|
|
41
|
|
42 test {
|
|
43 systemProperties 'property': 'value'
|
|
44 }
|