SHOW:
|
|
- or go back to the newest paste.
1 | apply plugin: 'java' | |
2 | apply plugin: 'eclipse' | |
3 | apply plugin: 'maven' | |
4 | apply plugin: 'jacoco' | |
5 | ||
6 | // Jenkins can override these values | |
7 | sourceCompatibility = 1.7 | |
8 | version = '0.1.0' | |
9 | projectName = 'jutils' | |
10 | ||
11 | group = 'eu.matthiasbraun' | |
12 | ||
13 | jar { | |
14 | manifest { | |
15 | attributes 'Implementation-Title': projectName, 'Implementation-Version': version | |
16 | } | |
17 | } | |
18 | tasks.withType(Compile) { | |
19 | options.encoding = "UTF-8" | |
20 | } | |
21 | ||
22 | // Update site for the Eclipse plugin: http://dist.springsource.com/release/TOOLS/gradle | |
23 | eclipse.project { | |
24 | // Make sure the project can be run as a Gradle build in Eclipse | |
25 | natures 'org.springsource.ide.eclipse.gradle.core.nature' | |
26 | } | |
27 | repositories { | |
28 | mavenCentral() | |
29 | } | |
30 | ||
31 | dependencies { | |
32 | compile 'org.slf4j:slf4j-api:1.7.5' | |
33 | compile 'org.slf4j:slf4j-jdk14:1.7.5' | |
34 | compile 'com.google.guava:guava:16.0' | |
35 | compile 'com.google.code.gson:gson:2.2.4' | |
36 | compile 'joda-time:joda-time:2.3' | |
37 | compile 'net.sourceforge.cssparser:cssparser:0.9.11' | |
38 | compile 'org.eclipse.swt.win32.win32:x86:3.3.0-v3346' | |
39 | ||
40 | // Some Jars are not in maven central -> use the Jars in this local folder as well | |
41 | compile fileTree('libs') | |
42 | ||
43 | // These Jars are needed for testing; the Jars from 'compile' are available for testing as well | |
44 | testCompile group: 'junit', name: 'junit', version: '4.+' | |
45 | } | |
46 | ||
47 | task wrapper(type: Wrapper) { | |
48 | gradleVersion = '1.10' | |
49 | } | |
50 | ||
51 | jacocoTestReport { | |
52 | description = 'Get the unit test code coverage.' | |
53 | ||
54 | reports { | |
55 | html.destination "${buildDir}/reports/jacoco" | |
56 | } | |
57 | } | |
58 | ||
59 | test { | |
60 | // Call 'gradle test jacocoTestReport' to get the code coverage | |
61 | jacoco { | |
62 | destinationFile = file("$buildDir/test-results/jacocoTest.exec") | |
63 | } | |
64 | } |