-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
128 lines (108 loc) · 3.6 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
plugins {
// code
id 'java'
// code quality
id "jacoco"
id "org.owasp.dependencycheck" version "5.3.2.1"
// dependency management
id 'com.github.ben-manes.versions' version '0.28.0' // find new versions of dependency task: dependencyUpdates
// IDEs
id "eclipse"
id "idea"
// publishing
id "maven-publish"
id "com.cinnober.gradle.semver-git" version "2.4.0"
id 'com.intershop.gradle.javacc' version '4.0.0' // prije je bio 2.0.0
}
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('org.apache.jena:jena-core:3.4.0')
compile('org.apache.jena:jena-querybuilder:3.4.0')
compile('org.apache.jena:jena-arq:3.4.0')
compile('org.apache.jena:jena-cmds:3.4.0')
//compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.4'
// https://mvnrepository.com/artifact/org.reflections/reflections
compile group: 'org.reflections', name: 'reflections', version: '0.9.11'
// common testing
testCompile('junit:junit:4.+')
testCompile('org.apache.poi:poi:4.0.1')
testCompile('org.apache.poi:poi-ooxml:4.0.1')
}
// 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')
task generateOntology {
doLast {
description = 'Generate Ontology Class for Testing'
def params = [
"-i", "${projectDir}/src/test/resources/testModel.ttl", // input file
"-o", "src/test/java", // output dir
"-n", "TEST_MODEL", // class name
"--package", "eu.h2020.symbiote.semantics.mapping.test.ontology", // package name
"--nocomments", "--ontology", "--nostrict"] // tags
javaexec {
classpath sourceSets.main.runtimeClasspath
main = 'jena.schemagen'
args = params
}
}
}
javacc {
configs {
MappingParser {
inputFile = file('src/main/jjtree/MappingParser.jjt')
outputDir = file(project.buildDir.absolutePath + '/generated-sources/javacc')
packageName = 'eu.h2020.symbiote.semantics.mapping.parser'
staticParam = 'false'
// lookahead = '3'
jjtree {
multi = 'true'
// visitor = 'false'
// visitorDataType = 'eu.h2020.symbiote.semantics.mapping.model.Mapping'
// visitorReturnType = 'eu.h2020.symbiote.semantics.mapping.model.Mapping'
// staticParam = 'false'
}
}
}
}