forked from vitrivr/cineast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (100 loc) · 3.79 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
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'java'
id 'idea'
id 'de.undercouch.download' version "4.1.1"
id 'com.google.osdetector' version '1.6.2'
}
allprojects {
/* Group name of our artifacts */
group = 'org.vitrivr'
/* Our current version */
version = '3.0.3'
apply plugin: 'java'
}
project.ext.protobufVersion = "3.14.0"
project.ext.grpcVersion = "1.34.0"
subprojects {
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2"
}
}
dependencies {
classpath "gradle.plugin.com.google.gradle:osdetector-gradle-plugin:1.6.2"
classpath "gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.14"
classpath "de.undercouch:gradle-download-task:4.1.1"
}
}
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
}
/* Important warnings that are currently missing simply because there are too many: "cast", "rawtypes". Ideally, "all" should be used in the future. */
def enabledWarnings = ["-Xlint:deprecation", "-Xlint:empty", "-Xlint:overrides", "-Xlint:serial", "-Xlint:static", "-Xlint:unchecked", "-Xlint:varargs"]
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs += enabledWarnings
}
compileTestJava.options.compilerArgs += enabledWarnings
dependencies {
/** Log4j 2 */
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.12.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.12.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.12.0'
/** Jackson (JSON conversion) */
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.0'
/** Test dependencies (JUnit 5) */
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.0'
testCompile group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.3.2'
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.0'
/** Protobuf & gRPC. */
compile group: "com.google.protobuf", name: "protobuf-java", version: "$protobufVersion"
compile group: "io.grpc", name: "grpc-netty", version: "${grpcVersion}"
compile group: "io.grpc", name: "grpc-protobuf", version: "${grpcVersion}"
compile group: "io.grpc", name: "grpc-stub", version: "${grpcVersion}"
}
}
project(':cineast-runtime') {
dependencies {
compile project(path: ':cineast-core', configuration: 'shadow')
}
}
project(':cineast-api') {
dependencies {
compile project(path: ':cineast-runtime', configuration: 'shadow')
compile project(path: ':cineast-core')
}
}
idea {
module {
downloadJavadoc = true
excludeDirs += file('data')
excludeDirs += file('thumbnails')
}
}
task getExternalFiles {
doLast {
def fileList = new File("externalFiles.csv")
fileList.eachLine { String line ->
def split = line.split(",")
download {
src split[0]
dest split[1]
}
}
}
}
task generateOpenApiSpecs(type: JavaExec){
classpath = project(":cineast-api").sourceSets.main.runtimeClasspath
main = 'org.vitrivr.cineast.api.docs.GenerateOpenApiSpecs'
def config = project.hasProperty("cineastConfig") ? project.getProperty("cineastConfig") : "cineast.json"
args("${config}")
}