-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
152 lines (124 loc) · 3.7 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id "com.diffplug.spotless" version "6.22.0"
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = 'io.qdrant'
version = '1.1.2'
description = 'Kafka Sink Connector for Qdrant.'
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri('https://packages.confluent.io/maven/')
}
}
sourceSets {
intTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
intTestImplementation.extendsFrom implementation
intTestImplementation.extendsFrom testImplementation
intTestRuntimeOnly.extendsFrom runtimeOnly
intTestRuntimeOnly.extendsFrom testRuntimeOnly
}
def kafkaVersion = '3.5.0'
dependencies {
implementation "org.apache.kafka:connect-api:$kafkaVersion"
implementation 'io.qdrant:client:1.10.0'
implementation 'io.grpc:grpc-protobuf:1.59.0'
implementation "io.grpc:grpc-netty-shaded:1.59.0"
implementation 'com.google.guava:guava:33.2.1-jre'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
implementation 'com.google.protobuf:protobuf-java-util:3.25.3'
implementation 'org.slf4j:slf4j-api:2.0.13'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
intTestImplementation 'org.testcontainers:junit-jupiter:1.19.6'
intTestImplementation 'org.testcontainers:qdrant:1.19.6'
intTestImplementation "org.apache.kafka:kafka_2.13:$kafkaVersion"
intTestImplementation "org.apache.kafka:kafka_2.13:$kafkaVersion:test"
intTestImplementation "org.apache.kafka:kafka-clients:$kafkaVersion"
intTestImplementation "org.apache.kafka:connect-runtime:$kafkaVersion"
intTestImplementation "org.apache.kafka:kafka_2.13:$kafkaVersion"
intTestImplementation "org.apache.kafka:kafka_2.13:$kafkaVersion:test"
intTestImplementation "org.apache.kafka:kafka-clients:$kafkaVersion:test"
intTestImplementation "org.apache.kafka:connect-runtime:$kafkaVersion:test"
}
java {
withSourcesJar()
withJavadocJar()
}
test {
useJUnitPlatform()
}
spotless {
java {
importOrder()
removeUnusedImports()
cleanthat()
googleJavaFormat()
formatAnnotations()
}
}
shadowJar {
relocate 'io.grpc', 'shadow.grpc'
mergeServiceFiles()
archiveClassifier.set('')
}
ext.releaseDate = DateTimeFormatter.ISO_LOCAL_DATE.format(LocalDateTime.now())
def archiveFilename = 'qdrant-kafka'
task prepareConfluentArchive(type: Copy) {
group = 'Confluent'
dependsOn 'shadowJar'
def baseDir = "$archiveFilename-${project.version}"
from('archive/manifest.json') {
expand project.properties
destinationDir = file "$buildDir/confluentArchive/$baseDir"
}
from('archive/assets') {
into 'assets'
}
from('archive/etc') {
include 'qdrant-kafka.properties'
into 'etc'
}
from("$buildDir/libs") {
include "${project.name}-${project.version}.jar"
into 'lib'
}
from('.') {
include 'README.md', 'LICENSE'
into 'doc'
}
}
task createConfluentArchive(type: Zip) {
group = 'Confluent'
dependsOn prepareConfluentArchive
from "$buildDir/confluentArchive"
archiveBaseName.set('')
archiveAppendix.set(archiveFilename)
archiveVersion.set(project.version.toString())
destinationDirectory.set(file("$buildDir/confluent"))
}
tasks.register('integrationTest', Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.intTest.output.classesDirs
classpath = sourceSets.intTest.runtimeClasspath
shouldRunAfter test
useJUnitPlatform()
testLogging {
events "passed"
}
}
check.dependsOn integrationTest