-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuild.gradle
179 lines (145 loc) · 5.03 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
plugins {
id 'java-library-distribution'
id 'jacoco'
id 'maven-publish'
id 'com.adarshr.test-logger' version "4.0.0"
}
group = 'com.github.CST-Group'
description = "CST"
java {
//sourceCompatibility = JavaVersion.VERSION_11
//targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
version = '1.4.2'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
configurations {
extraLibs
}
dependencies {
configurations.implementation.extendsFrom(configurations.extraLibs)
api 'com.google.code.gson:gson:2.10.1'
api 'net.openhft:compiler:2.3.0' // Used by representation/owrl/CodeBuilder.java
api group: 'org.json', name: 'json', version: '20230227'
api 'com.google.inject:guice:7.0.0'
//api 'com.github.sdarg:opt4j:3.3.0' // Used in GLAS
//api 'com.github.sdarg:opt4j:4780f4e' // Used in GLAS
api group: 'org.opt4j', name: 'opt4j-core', version: '3.1.4' // Used in GLAS
api group: 'org.opt4j', name: 'opt4j-optimizers', version: '3.1.4'
api group: 'org.opt4j', name: 'opt4j-viewer', version: '3.1.4'
api group: 'org.opt4j', name: 'opt4j-benchmarks', version: '3.1.4'
api group: 'org.opt4j', name: 'opt4j-operators', version: '3.1.4'
api group: 'org.opt4j', name: 'opt4j-satdecoding', version: '3.1.4'
api group: 'org.opt4j', name: 'opt4j-tutorial', version: '3.1.4'
api 'org.antlr:antlr4-runtime:4.5.3' // Used in OwrlBaseListener
api 'com.github.masecla22:java-express:0.2.2'
//api 'io.vacco.murmux:murmux:2.2.2'
implementation 'ch.qos.logback:logback-classic:1.3.6'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.1'
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
jar {
from {
configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
manifest {
attributes(
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' ')
)
}
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
from {
configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet') // this is to avoid complaints about documentation missing parameter description
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
from {
configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task uberJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveClassifier = 'full'
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}
artifacts
{
archives javadocJar, sourcesJar, uberJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
//tasks.register('applicationCodeCoverageReport', JacocoReport) {
// executionData run
// sourceSets sourceSets.main
//}
jacoco {
toolVersion = "0.8.10"
}
jacocoTestReport {
reports {
xml.required = true
html.outputLocation = layout.buildDirectory.dir('test-coverage')
dependsOn test // tests are required to run before generating the report
}
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
testLogging {
testLogging.showStandardStreams = true
}
useJUnitPlatform()
}
testlogger {
// pick a theme - mocha, standard, plain, mocha-parallel, standard-parallel or plain-parallel
theme 'mocha-parallel'
// set to false to disable detailed failure logs
showExceptions true
// set to false to hide stack traces
showStackTraces true
// set to true to remove any filtering applied to stack traces
showFullStackTraces true
// set to false to hide exception causes
showCauses true
// set threshold in milliseconds to highlight slow tests
slowThreshold 2000
// displays a breakdown of passes, failures and skips along with total duration
showSummary true
// set to true to see simple class names
showSimpleNames false
// set to false to hide passed tests
showPassed true
// set to false to hide skipped tests
showSkipped true
// set to false to hide failed tests
showFailed true
// enable to see standard out and error streams inline with the test results
showStandardStreams true
// set to false to hide passed standard out and error streams
showPassedStandardStreams true
// set to false to hide skipped standard out and error streams
showSkippedStandardStreams true
// set to false to hide failed standard out and error streams
showFailedStandardStreams true
}