-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
143 lines (121 loc) · 3.68 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
buildscript {
ext {
rootGradleDir = "${rootProject.rootDir}/gradle"
}
}
plugins {
id "com.github.spotbugs" version "4.7.0"
}
apply plugin:'java'
apply plugin:'groovy'
apply plugin:'idea'
apply plugin:'application'
apply plugin:'maven-publish'
apply plugin:'signing'
apply plugin:'com.github.spotbugs'
group = "com.github.hschneid"
archivesBaseName = "xfvrp"
version = "11.4.6-RELEASE"
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
repositories {
mavenCentral()
}
mainClassName = 'util.Application'
// In this section you declare the dependencies for your production and test code
dependencies {
implementation 'colt:colt:1.2.0'
// Necessary for ORG-VRP INSTANCES
implementation 'org.vrp-rep:vrprep-model:0.5.0'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.2'
implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1'
implementation 'javax.activation:activation:1.1'
testImplementation 'org.spockframework:spock-core:2.1-groovy-3.0'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.11.1'
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.7'
}
// Maven - Publish
task javadocJar(type: Jar) {
archiveClassifier.set('javadoc')
from javadoc
}
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
task mainJar(type: Jar) {
with jar
}
publishing {
publications {
maven(MavenPublication) {
artifact mainJar
artifact sourcesJar
artifact javadocJar
pom {
name = 'XFVRP'
packaging 'jar'
// optionally artifactId can be defined here
description = 'Solver for realistic vehicle routing problems'
url = 'https://github.com/hschneid/xfvrp'
scm {
connection = 'scm:git:git://github.com/hschneid/xfvrp.git'
developerConnection = 'scm:git:ssh://github.com/hschneid/xfvrp.git'
url = 'https://github.com/hschneid/xfvrp'
}
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'hschneid'
name = 'Holger Schneider'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
credentials {
username ossrhUsername
password ossrhPassword
}
if (project.version.endsWith("-SNAPSHOT")) {
url "https://oss.sonatype.org/content/repositories/snapshots/"
} else {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
}
}
}
signing {
sign publishing.publications.maven
}
spotbugsMain.onlyIf { t -> !t.name.equals("build") }
spotbugsTest.onlyIf { false }
// Example to configure HTML report
spotbugsMain {
ignoreFailures = true
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/main/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}
spotbugsTest {
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/test/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}