-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
61 lines (49 loc) · 1.22 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
plugins {
id "org.sonarqube" version "1.2"
}
apply plugin: "java"
apply plugin: "jacoco"
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
repositories {
mavenCentral()
jcenter()
}
sourceSets {
main.java.srcDir "src"
test.java.srcDir "test"
}
test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
task testWithCoverage(dependsOn: ['cleanTest', 'test', 'jacocoTestReport'])
jacoco {
toolVersion = "0.7.5.201505241946"
reportsDir = file("$buildDir/reports/jacoco")
}
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
dependencies {
compile 'javax.inject:javax.inject-tck:1'
testCompile 'org.jmockit:jmockit:1.+' //jmockit before junit
testCompile 'junit:junit:4.+'
testCompile 'org.mockito:mockito-core:1.+'
}
jar {
from configurations.compile.collect { entry -> zipTree(entry) }
manifest.attributes "Main-Class" : "photorist.Photorist"
}
//Copy all dependencies to lib
//Use it with IntelliJ
task copyDeps(type: Copy) {
into 'lib'
from configurations.testRuntime,
configurations.runtime
}