forked from instaclustr/kafka-ldap-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
151 lines (130 loc) · 4.52 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
buildscript {
ext.kafka_version = '3.9.0'
ext.scala_version = '2.13'
ext.kotlin_version = '2.1.10'
ext.unboundid_version = '7.0.2'
ext.caffeine_version = '3.2.0'
ext.jackson_version = '2.18.3'
ext.spek_version = '2.0.19'
ext.kluent_version = '1.73'
ext.kotlinter_version = '5.0.1'
ext.shadow_version = '8.1.1'
ext.versions_version = '0.52.0'
ext.sonarqube_version = '6.0.1.5171'
ext.slf4j_version = '2.0.17'
ext.junit_version = '5.12.0'
ext.junit_platform_launcher_version = '1.12.0'
ext.org_jetbrains_kotlin = 'org.jetbrains.kotlin'
}
plugins {
id 'org.jetbrains.kotlin.jvm' version "$kotlin_version"
id 'org.jmailen.kotlinter' version "$kotlinter_version"
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version "$shadow_version"
id 'com.github.ben-manes.versions' version "$versions_version"
id 'org.sonarqube' version "$sonarqube_version"
id 'jacoco'
id 'java'
}
group 'com.ultratendency.kafka.ldap'
version '2.4.1' // x-release-please-version
java {
sourceCompatibility = JavaVersion.VERSION_21
}
test {
useJUnitPlatform {
includeEngines 'spek2'
}
}
repositories {
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_$scala_version:$kafka_version"
implementation "com.github.ben-manes.caffeine:caffeine:$caffeine_version"
implementation "org.slf4j:slf4j-api:$slf4j_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"
}
testImplementation "org.junit.jupiter:junit-jupiter:$junit_version"
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junit_platform_launcher_version"
}
configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_21.toString()
}
compileTestKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_21.toString()
}
test {
useJUnitPlatform {
includeEngines 'spek2'
}
testLogging {
events 'passed', 'skipped', 'failed'
}
}
shadowJar {
archiveBaseName = "${project.name}-$scala_version-$kafka_version"
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 {
name = 'GitHubPackages'
url = uri('https://maven.pkg.github.com/ultratendency/kafka-ldap-integration')
credentials {
username = project.findProperty('gpr.user') ?: System.getenv('USERNAME')
password = project.findProperty('gpr.key') ?: System.getenv('TOKEN')
}
}
}
}
sonarqube {
properties {
property 'sonar.projectKey', 'ultratendency_kafka-ldap-integration'
property 'sonar.organization', 'ultratendency'
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.coverage.jacoco.xmlReportPaths',
"${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property 'sonar.gradle.skipCompile', true
}
}
jacocoTestReport {
reports {
xml.required = true
}
}
task copyJarToKafka(type: Copy) {
from findProperty('kafkaJARSrc') ?: ''
into findProperty('kafkaJARDest') ?: ''
}