-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
126 lines (104 loc) · 3.75 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
if (!hasProperty('mainClass')) {
ext.mainClass = 'eu.h2020.symbiote.ssp.SspApplication'
}
// initial extensions to gradle
buildscript {
ext {
springBootVersion = '1.5.14.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:1.0.0.RELEASE"
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath group: 'com.cinnober.gradle', name: 'semver-git', version: '2.2.1'
classpath 'org.owasp:dependency-check-gradle:1.4.5.1'
}
}
// code
apply plugin: "io.spring.dependency-management"
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
// code quality
apply plugin: 'jacoco'
apply plugin: 'org.owasp.dependencycheck'
// IDEs
apply plugin: 'eclipse'
apply plugin: 'idea'
// publishing
//apply plugin: 'com.cinnober.gradle.semver-git'
// XXX please change with your commits according to http://semver.org/
project.version = '3.0.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// dependencies section
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
/*
Forces dependencies' cache invalidation for each build for dependencies marked with
{ changing = true }
e.g.
compile('com.github.symbiote-h2020:SymbIoTeLibraries:develop-SNAPSHOT'){ changing = true }
*/
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
/* SymbIoTeLibraries manual:
One can use the library from jitpack by default with the notation:
compile('com.github.symbiote-h2020:SymbIoTeLibraries:develop-SNAPSHOT') {changing = true }
or having cloned locally the SymbIoTeLibraries repo use it directly with project dependency by:
compile project(':SymbIoTeLibraries')
Important --- In order to use the latter you need to:
1) switch comments on the artifact and project dependencies
2) always have only one uncommented
3) project dependency requires changes in settings.gradle file in this project
4) never commit build.gradle which has project dependencies active as it will break CI builds
*/
compile('com.github.symbiote-h2020:SymbIoTeLibraries:5.27+')
// Spring
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
// OData
compile("org.apache.olingo:odata-commons-api:${'4.3.0'}")
compile("org.apache.olingo:odata-commons-core:${'4.3.0'}")
compile("org.apache.olingo:odata-server-api:${'4.3.0'}")
compile("org.apache.olingo:odata-server-core:${'4.3.0'}")
// Websocket
compile("org.springframework.boot:spring-boot-starter-websocket")
// test only
compile("org.springframework.boot:spring-boot-starter-web")
testCompile("org.springframework.boot:spring-boot-starter-test")
//Owlapi
//compile('net.sourceforge.owlapi:owlapi-distribution:5.1.1')
compile('net.sourceforge.owlapi:owlapi-contract:5.1.1')
compile('net.sourceforge.owlapi:owlapi-util:3.3')
//json
compile('org.json:json:20171018')
}
// code quality below
task generateJavaDocs(type: Javadoc) {
source = sourceSets.main.allJava
destinationDir = reporting.file("javadocs")
}
// jacoco configuration section
jacoco {
toolVersion = "0.7.9"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
// owasp config
dependencyCheck {
outputDirectory = "build/reports/security"
}
// including code quality extensions into the build
check.dependsOn(jacocoTestReport)//, 'dependencyCheck')