-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
111 lines (96 loc) · 3.08 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'pmd'
apply plugin: 'cobertura'
sourceCompatibility = 1.6
targetCompatibility = 1.6
group = 'com.robertozagni'
version = '0.1'
repositories {
mavenLocal()
mavenCentral()
// jcenter()
// maven { url "https://jitpack.io" } // for influxdb-java
flatDir {
dirs "$rootProject.projectDir/libs"
}
}
dependencies {
// Algorithms from Princeton
compile files('libs/algs4.jar')
//compile fileTree(dir: 'libs', include: ['*.jar'])
// Logging modules - Using the slf4j API to bind to Log4J
compile group: 'org.slf4j', name:'slf4j-api', version:'1.7.13' // API
compile group: 'org.slf4j', name:'slf4j-log4j12', version:'1.7.13' // Binding to Log4J
// Testing
testCompile 'junit:junit:4.11'
// testCompile "org.mockito:mockito-core:1.+"
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'net.saliman:gradle-cobertura-plugin:2.3.0'
}
}
jar {
baseName = 'algoritmi'
manifest {
def manifestClasspath = configurations.runtime.collect { it.getName() }.join(',')
attributes 'Implementation-Title': 'Algoritmi',
'Implementation-Version': version,
//, 'Main-Class': 'it.rz.algoritmi.MyLinkedList'
'Class-Path': manifestClasspath
}
}
uploadArchives {
repositories {
mavenLocal()
}
}
task fatJar(type: Jar) {
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
checkstyle {
ignoreFailures = true
toolVersion = '6.9' // default is 5.9
configFile = rootProject.file('codequality/checkstyle.xml')
}
findbugs {
ignoreFailures = true
includeFilter = rootProject.file("codequality/findbugs.xml")
//excludeFilter = rootProject.file("codequality/findbugsExcludeFilter.xml")
// reportsDir = file("$project.buildDir/findbugsReports")
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
pmd {
toolVersion = "5.2.3"
ignoreFailures = true
ruleSetFiles = files('codequality/pmdrulesets.xml')
ruleSets = []
// 'java-android','java-basic', 'java-braces', 'java-clone', 'java-codesize', 'java-comments',
// 'java-controversial', 'java-coupling', 'java-design', 'java-empty', 'java-finalizers', 'java-imports',
// 'java-j2ee', 'java-javabeans', 'java-junit', 'java-logging-jakarta-commons', 'java-logging-java',
// 'java-migrating', 'java-naming', 'java-optimizations', 'java-strictexception', 'java-strings',
// 'java-sunsecure', 'java-typeresolution', 'java-unnecessary', 'java-unusedcode'
}
cobertura {
coverageFormats = ['html', 'xml']
coverageIgnoreTrivial = true
coverageIgnores = ['org.slf4j.Logger.*']
coverageReportDir = new File("$buildDir/reports/cobertura")
}