-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (90 loc) · 2.67 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
plugins {
id 'java'
id 'distribution'
id 'com.github.jk1.dependency-license-report' version '2.0'
}
group 'org.jlab.kafka.connect'
version '2.0.0'
tasks.withType(JavaCompile) {
options.release = 11
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
repositories {
mavenCentral()
}
sourceSets {
integration {
java.srcDir "${projectDir}/src/integration/java"
resources.srcDir "${projectDir}/src/integration/resources"
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
testImplementation.extendsFrom compileOnly
integrationImplementation.extendsFrom testImplementation
integrationRuntimeOnly.extendsFrom runtimeOnly
}
dependencies {
implementation 'org.epics:jca:2.4.8',
'org.jlab:kafka-common:1.1.0'
compileOnly 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
compileOnly 'org.apache.kafka:connect-api:3.5.0'
compileOnly 'org.slf4j:slf4j-log4j12:1.7.36'
testImplementation 'junit:junit:4.13.2'
integrationImplementation 'org.apache.kafka:kafka-clients:3.5.0'
integrationImplementation 'org.slf4j:slf4j-log4j12:1.7.36'
}
task integrationTest(type: Test) {
description = 'Runs integration tests using existing BOOTSTRAP_SERVERS env.'
group = 'verification'
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
environment 'BOOTSTRAP_SERVERS', 'localhost:9094'
environment 'EPICS_CA_ADDR_LIST', 'localhost'
testLogging {
events "passed", "skipped", "failed"
showStandardStreams = true
exceptionFormat "full"
}
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
jar {
archiveFileName = 'epics2kafka.jar'
}
processIntegrationResources {
duplicatesStrategy 'include'
}
processResources {
filesMatching('release.properties') {
filter {
String line -> line.replaceAll("@VERSION@", version)
}
}
}
build {
dependsOn(installDist)
}
installDist.dependsOn(generateLicenseReport)
distTar.dependsOn(generateLicenseReport)
distZip.dependsOn(generateLicenseReport)
distributions {
main {
contents {
from jar
/*We only include jars not already provided in Kafka/libs dir*/
/*Example, we exclude log4j, slf4j, jackson, kafka */
from (project.configurations.runtimeClasspath).with {
include('epics2kafka*')
include('kafka-common*')
include('jca*')
}
}
}
}