-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
94 lines (77 loc) · 2.81 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
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'maven'
id 'maven-publish'
}
group = 'de.upb.crypto.clarc'
version = '1.1.2'
description = """"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
api files('dependency-bin/math-1.0.0.jar')
api files('dependency-bin/craco-1.1.0.jar')
api files('dependency-bin/protocols-1.0.0.jar')
api files('dependency-bin/mclwrap-0.0.2.jar')
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0'
//implementation group: 'com.google.code.findbugs', name: 'annotations', version: '2.0.1'
implementation group: 'log4j', name: 'log4j', version: '1.2.12'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
implementation group: 'com.googlecode.json-simple', name: 'json-simple', version:'1.1'
// For tests
testImplementation(files('dependency-bin/protocols-1.0.0-tests.jar'))
testImplementation 'org.easymock:easymock:3.5'
testImplementation 'org.reflections:reflections:0.9.12'
// Use JUnit 5 test framework
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.2.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.2.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
}
test {
useJUnitPlatform()
maxParallelForks 4
//we want display the following test events
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
events "PASSED", "STARTED", "FAILED", "SKIPPED"
}
/*afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}*/
}
//packaging tests
task packageTests(type: Jar) {
classifier = 'tests'
baseName = project.name + '-test'
from sourceSets.test.output+sourceSets.test.allSource
}
configurations {
testArtifacts
}
artifacts {
archives packageTests
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}