-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
103 lines (83 loc) · 2.37 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
plugins {
id 'groovy'
id 'application'
id 'jacoco'
id "org.sonarqube" version "3.4.0.2513"
// JMH Gradle Plugin
// https://github.com/melix/jmh-gradle-plugin
id "me.champeau.jmh" version "0.7.0"
}
group 'lv.id.jc'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
google()
}
//tasks.withType(JavaExec) {
// jvmArgs = ['-Xmx4000m', '-Xms2000m']
//}
configurations.jmhImplementation.extendsFrom(configurations.implementation)
dependencies {
// Spock Framework
testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0'
// testImplementation 'org.codehaus.groovy:groovy-all:3.0.13'
testImplementation 'org.spockframework:spock-core'
// Spock Reports
testRuntimeOnly 'com.athaydes:spock-reports:2.4.0-groovy-4.0'
testImplementation 'org.slf4j:slf4j-api:2.0.6'
testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.6'
// JMH benchmark
jmh 'org.openjdk.jmh:jmh-core:1.36'
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.36'
jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.36'
}
// In order to run the application type the command:
// ./gradlew run -q --console=plain --args="ip_addresses"
run {
standardInput = System.in
}
application {
mainModule = 'ip.counter.main'
mainClass = 'com.yourcodereview.jegors.task1.Main'
}
jar {
manifest {
attributes(
'Main-Class': 'lv.id.jc.ipcounter.Main'
)
}
}
test {
minHeapSize = '800m'
maxHeapSize = '2000m'
useJUnitPlatform()
finalizedBy jacocoTestReport
systemProperty 'com.athaydes.spockframework.report.showCodeBlocks', true
systemProperty 'com.athaydes.spockframework.report.projectName', 'IPv4 Counter'
systemProperty 'com.athaydes.spockframework.report.projectVersion', 1.0
}
jacoco {
toolVersion = "0.8.7"
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
csv.required = false
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
"**/config/*"
])
}))
}
}
sonarqube {
properties {
property "sonar.projectKey", "rabestro_codereview-task1-ip-addresses"
property "sonar.organization", "rabestro"
property "sonar.host.url", "https://sonarcloud.io"
}
}