-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.gradle.kts
118 lines (113 loc) · 3.57 KB
/
build.gradle.kts
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
plugins {
kotlin("jvm") version "1.4.10"
java
id("com.github.johnrengelman.shadow") version "7.1.2"
signing
idea
distribution
id("net.researchgate.release") version "3.0.2"
id("com.github.ben-manes.versions") version "0.42.0"
}
group = "com.github.thake.logminer"
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven {
url = uri("https://maven.ceon.pl/artifactory/repo")
}
maven {
url = uri("https://packages.confluent.io/maven")
}
}
dependencies {
val kafkaVersion by extra("2.5.1")
val confluentVersion by extra("5.5.14")
val kotestVersion by extra("4.2.5")
val junitVersion by extra("5.7.0")
implementation(kotlin("stdlib-jdk8"))
implementation("com.github.thake.logminer", "logminer-sql-parser", "0.1.0")
implementation("net.openhft", "chronicle-queue", "5.24ea9")
implementation("io.github.microutils", "kotlin-logging", "1.12.5")
compileOnly("org.apache.kafka", "connect-api", kafkaVersion)
testRuntimeOnly("com.oracle.ojdbc", "ojdbc8", "19.3.0.0")
testImplementation("org.apache.kafka", "connect-api", kafkaVersion)
testImplementation(platform("org.testcontainers:testcontainers-bom:1.17.6"))
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
testImplementation("io.confluent","kafka-connect-avro-data",confluentVersion)
testImplementation("org.testcontainers", "junit-jupiter")
testImplementation("org.testcontainers:oracle-xe")
testImplementation("ch.qos.logback", "logback-classic", "1.2.11")
testImplementation("ch.qos.logback", "logback-core", "1.4.5")
testImplementation("io.mockk:mockk:1.12.3")
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
build {
dependsOn(shadowJar)
}
test {
useJUnitPlatform()
/*
{
includeEngines("junit-jupiter")
}
*/
}
shadowJar {
archiveBaseName.set("logminer-kafka-connect")
}
idea {
module {
isDownloadSources = true
isDownloadJavadoc = false
}
}
kotlinSourcesJar {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
}
distributions {
main {
//The main distribution is in a format needed for confluent-hub:
//https://docs.confluent.io/current/connect/managing/confluent-hub/component-archive.html
distributionBaseName.set("thake-${project.name}")
contents {
into("lib") {
from(tasks["jar"])
from(configurations.runtimeClasspath)
}
into("doc") {
from("LICENSE", "Readme.md")
}
into("etc") {
from("logminer-kafka-connect.properties")
}
into("") {
from("manifest.json") {
this.expand(
"version" to project.version,
"name" to project.name
)
}
}
}
}
}
signing {
useGpgCmd()
isRequired = !isSnapshot
sign(tasks["distZip"])
}
inline val Project.isSnapshot
get() = version.toString().endsWith("-SNAPSHOT")