This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
116 lines (97 loc) · 3.33 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
buildscript {
ext.kotlin_version = '1.3.11'
ext.kafka_version = '2.0.0'
ext.unboundid_version = '4.0.9'
ext.caffeine_version = '2.6.2'
ext.jackson_version = '2.9.7'
ext.spek_version = '2.0.0-rc.1'
ext.kluent_version = '1.39'
ext.slf4j_version = '1.7.5'
}
plugins{
id "org.jetbrains.kotlin.jvm" version "1.3.10"
id 'org.jmailen.kotlinter' version '1.15.0'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '4.0.3'
id 'com.github.ben-manes.versions' version '0.20.0'
}
group 'no.nav.common.security'
// see https://docs.confluent.io/current/installation/versions-interoperability.html#interoperability-versions
// '<kafka version>_<this plugin version>'
version '2.0_0.58'
sourceCompatibility = 1.8
test { useJUnitPlatform { includeEngines 'spek2' } }
repositories {
maven { url "https://dl.bintray.com/spekframework/spek-dev" }
jcenter()
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.unboundid:unboundid-ldapsdk:$unboundid_version"
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
implementation "org.apache.kafka:kafka_2.12:$kafka_version"
implementation "com.github.ben-manes.caffeine:caffeine:$caffeine_version"
testImplementation "org.amshove.kluent:kluent:$kluent_version"
testImplementation ("org.spekframework.spek2:spek-dsl-jvm:$spek_version") {
exclude group: 'org.jetbrains.kotlin'
}
testRuntimeOnly ("org.spekframework.spek2:spek-runner-junit5:$spek_version") {
exclude group: 'org.jetbrains.kotlin'
}
testRuntime "org.slf4j:slf4j-jdk14:$slf4j_version"
}
configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
test {
useJUnitPlatform {
includeEngines 'spek2'
}
testLogging.events("passed", "skipped", "failed")
}
shadowJar {
classifier = null
dependencies {
exclude(dependency('org.apache.kafka::'))
exclude(dependency('com.fasterxml.jackson.core:jackson-databind:'))
exclude(dependency('org.lz4::'))
exclude(dependency('org.xerial.snappy::'))
exclude(dependency('org.slf4j::'))
exclude(dependency('com.yammer.metrics::'))
exclude(dependency('com.101tec::'))
exclude(dependency('org.apache.zookeeper::'))
exclude(dependency('log4j::'))
exclude(dependency('net.sf.jopt-simple::'))
exclude(dependency('org.scala-lang::'))
}
}
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
repositories {
maven {
credentials {
username findProperty("nexusUser")
password findProperty("nexusPassword")
}
url findProperty("nexusURL")
}
}
}
task copyJarToKafka(type: Copy) {
from findProperty("kafkaJARSrc") ?: ''
into findProperty("kafkaJARDest") ?: ''
}