-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
114 lines (93 loc) · 3 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
// initial extensions to gradle
buildscript {
ext {
swaggerAnnotationsVersion = '1.5.16'
querydslVersion = '4.2.2'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath group: 'com.cinnober.gradle', name: 'semver-git', version: '2.3.1'
classpath 'org.owasp:dependency-check-gradle:3.2.0'
}
}
apply plugin: 'java'
// 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'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8
publishing {
publications {
maven(MavenPublication) {
groupId = 'eu.h2020.symbiote'
version = project.version
from components.java
}
}
}
// dependencies section
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
compile('com.github.symbiote-h2020:SymbIoTeSecurity:[27.5,27.999]'){ changing = true }
compile('com.github.symbiote-h2020:SymbIoTeSemantics:[2.3,2.999]') { changing = true }
compile('com.github.symbiote-h2020:SemanticMapping:[2.0,2.999]') { changing = true }
// allows to select the downloaded matching sources in IntelliJ Idea as it fails to do so automatically from jitpack repo
//compile('com.github.symbiote-h2020:SymbIoTeSecurity:[27.2,27.999]:sources'){ changing = true }
//compile project(':SymbIoTeSecurity')
//from symbioteLibs
compile('joda-time:joda-time:2.9.9')
compile('javax.validation:validation-api:2.0.0.Final')
// Swagger annotations for documentation
compile("io.swagger:swagger-annotations:${swaggerAnnotationsVersion}")
// querydsl
compile("com.querydsl:querydsl-mongodb:${querydslVersion}")
implementation 'org.springframework.data:spring-data-mongodb:2.2.7.RELEASE'
// Java 11
implementation('javax.annotation:javax.annotation-api:1.3.2')
implementation 'org.apache.directory.studio:org.slf4j.api:1.7.2'
// common testing
testCompile('junit:junit:[4.12,4.999]')
testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
testCompile('org.mockito:mockito-core:3.3.3')
}
// code quality below
task generateJavaDocs(type: Javadoc) {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath
destinationDir = reporting.file("javadocs")
options {
setMemberLevel JavadocMemberLevel.PUBLIC
setAuthor true
links "https://docs.oracle.com/javase/8/docs/api/"
}
}
// jacoco configuration section
jacoco {
toolVersion = "0.8.5"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
// owasp config
dependencyCheck {
outputDirectory = file("$rootDir/build/reports/security")
}
// including code quality extensions into the build
check.dependsOn(jacocoTestReport)//, 'dependencyCheck')