-
Notifications
You must be signed in to change notification settings - Fork 50
/
build.gradle
130 lines (108 loc) · 4.2 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'de.undercouch.download' version "5.0.5"
id 'com.google.osdetector' version '1.7.0'
id 'java-library'
id 'idea'
}
allprojects {
/* Group name of our artifacts */
group = 'org.vitrivr'
/* Our current version, on dev branch this should always be release+1-SNAPSHOT */
version = '3.12.4'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
}
subprojects {
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2"
}
}
dependencies {
classpath "gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18"
}
}
apply plugin: 'com.github.johnrengelman.shadow'
shadowJar {
zip64 true // Required to allow more than 65535 entries in final archive
}
sourceCompatibility = 17
targetCompatibility = 17
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
/* 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 */
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: version_log4j2
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: version_log4j2
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: version_log4j2
/** Jackson (JSON conversion) */
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: version_jackson
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: version_jackson
/** Protobuf */
implementation group: 'io.grpc', name: 'grpc-stub', version: '1.45.1'
implementation group: 'io.grpc', name: 'grpc-netty', version: '1.45.1'
/** Test dependencies (JUnit 5) */
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: version_junit
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: version_junit
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: version_junit_platform
}
}
idea {
module {
downloadJavadoc = true
excludeDirs += file('data')
excludeDirs += file('thumbnails')
excludeDirs += file('output')
excludeDirs += file('logs')
excludeDirs += file('resources')
}
}
task getExternalFiles {
doLast {
def fileList = rootProject.file("externalFiles.csv")
fileList.eachLine { String line ->
def split = line.split(",")
def destination = split[1]
download.run {
src split[0]
dest destination
}
if (destination.endsWith(".tar.gz")) {
def compressed = file(destination)
def target = file(destination.substring(0, destination.length() - 7))
copy {
from tarTree(compressed)
into target
}
delete(compressed)
}
return
}
}
}
task generateOpenApiSpecs(type: JavaExec) {
classpath = project(":cineast-api").sourceSets.main.runtimeClasspath
mainClass.set('org.vitrivr.cineast.api.docs.GenerateOpenApiSpecs')
def config = project.hasProperty("cineastConfig") ? project.getProperty("cineastConfig") : "cineast.json"
args("${config}")
}
task generateOAS(type: Download) {
/* This requires a locally running Cineast */
src 'http://localhost:4567/openapi-specs'
dest "${project.projectDir}/docs/openapi.json"
}