-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
150 lines (126 loc) · 3.77 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
// MAJOR VERSION - Manually set
//----------------------
ext{
majorNumber = 2
}
//----------------------
apply from: 'gradle/ide.gradle'
apply from: 'gradle/version.gradle'
apply from: 'gradle/tasks.gradle'
apply from: 'gradle/mavencentral.gradle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = "org.sdmlib"
// apply plugins/external files only on jenkins build
// jenkins needs -Pjenkins switch
if (project.hasProperty('jenkins')) {
//apply plugin: 'checkstyle'
apply from: 'gradle/artifactory.gradle'
apply from: 'gradle/mavencentral.gradle'
}
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
sourceSets.main.java.srcDirs += ['src/main/replication']
buildscript {
repositories {
jcenter()
}
dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.2.4')
classpath 'org.ajoberstar:gradle-git:0.2.3'
}
}
artifacts {
archives sourceJar, javadocJar, fatJar, pmJar, pmJarVersion
}
test {
if (project.hasProperty('maxParallelForks'))
maxParallelForks = project.maxParallelForks as int
if (project.hasProperty('forkEvery'))
forkEvery = project.forkEvery as int
}
repositories {
jcenter()
//mavenLocal()
mavenCentral()
maven { url 'https://repo.gradle.org/gradle/libs-releases' }
// NetworkParser
if((gitVersion.isMaster() || isTravisSnapshot())== false) {
maven { url "http://oss.sonatype.org/content/repositories/snapshots" }
}
//if(gitVersion.isMaster() || isTravisSnapshot()) {
// maven { url "https://se.cs.uni-kassel.de/artifactory/libs-release-local" }
//}else{
// maven { url "https://se.cs.uni-kassel.de/artifactory/libs-snapshot-local" }
//}
}
dependencies {
implementation(group: 'junit', name: 'junit', version: '[4,)')
implementation "org.eclipse.paho:org.eclipse.paho.client.mqttv3:+"
// https://mvnrepository.com/artifact/jfree/jfreechart
implementation group: 'jfree', name: 'jfreechart', version: '+'
implementation 'org.gradle:gradle-tooling-api:4.3.+'
testImplementation 'org.testfx:testfx-junit:4.0+'
testImplementation "io.moquette:moquette-broker:0.10"
testImplementation 'org.slf4j:slf4j-simple:1.7.10'
implementation "guru.nidi:graphviz-java:+"
if ( ! project.hasProperty('useLocalDependencies'))
{
if (new File("../NetworkParser/build/libs/networkparser.local.jar").exists() )
{
println "using local networkparser.local.jar"
compile files("../NetworkParser/build/libs/networkparser.local.jar")
}
else if((gitVersion.isMaster())) // || isTravisSnapshot())== false)
{
println "using master networkparser.jar "
compile group: "de.uniks", name: "NetworkParser", version: "latest.integration", classifier:"sources18", changing: true
}
else
{
println "using snapshot jar"
compile 'de.uniks:NetworkParser:4.8.+:sources18'
}
}
else
{
println "using local networkparser"
compile fileTree(dir: "../NetworkParser/build/libs", include: ['networkparser.local.jar'])
}
compile 'de.uniks:NetworkParser:4.8.+:sources18'
}
jacoco {
toolVersion = "0.7.9"
}
test {
testLogging {
events "failed"
exceptionFormat "full"
showStackTraces true
showStandardStreams true
showCauses true
}
}
// Java Compiler Args
tasks.withType(JavaCompile) {
//Suppress underscore warnings
options.compilerArgs << '-Xlint:none'
}
def isTravisSnapshot() {
boolean result=false;
Map<String, String> env = System.getenv();
for (String envName : env.keySet()) {
if("travisci".equalsIgnoreCase(envName)) {
result = "snaphot".equalsIgnoreCase(env.get(envName));
}
}
return result;
}
defaultTasks 'clean', 'jar'