-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
96 lines (84 loc) · 3.54 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java application project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.8.2/userguide/building_java_projects.html
*/
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
id 'java'
id 'idea'
}
group = 'org.bigdatadevs.kafkabatch'
//version = release + '.' + build
version = "1.0"
mainClassName = "org.bigdatadevs.kafkabatch.BatchProcessStarter"
description = "kafka-batch-processor"
sourceCompatibility = 1.11
targetCompatibility = 1.11
repositories {
mavenLocal()
mavenCentral()
}
ext {
spring_version = '5.1.20.RELEASE'
slf4j_version = '1.7.30'
log4j_to_slf4j_version = '2.13.+'
logback_version = '1.2.3'
kafka_version = '2.5.1'
}
dependencies {
// https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafka_version}"
// This dependency is used by the application.
implementation 'com.google.guava:guava:29.0-jre'
// https://mvnrepository.com/artifact/org.springframework/
implementation group: 'org.springframework', name: 'spring-core', version: "${spring_version}"
implementation group: 'org.springframework', name: 'spring-context', version: "${spring_version}"
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: "${slf4j_version}"
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-to-slf4j
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: "${log4j_to_slf4j_version}"
// https://mvnrepository.com/artifact/ch.qos.logback/logback-core
implementation group: 'ch.qos.logback', name: 'logback-core', version: "${logback_version}"
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
implementation group: 'ch.qos.logback', name: 'logback-classic', version: "${logback_version}"
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.11'
// missing in JDK since Java 11
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.+'
// for testing:
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.7.+'
testImplementation group: 'org.springframework', name: 'spring-test', version: "${spring_version}"
// Use JUnit Jupiter API for testing.
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
// Use JUnit Jupiter Engine for testing.
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
application {
// Define the main class for the application.
mainClass = 'org.bigdatadevs.kafkabatch.BatchProcessStarter'
}
processResources {
filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [version: project.version])
}
jar {
exclude ("config")
manifest {
attributes(
"Implementation-Title": rootProject.name,
"Implementation-Version": version,
"Build-Time": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
)
}
}
run {
// support passing -Dsystem.property=value to bootRun task
systemProperties = System.properties
}
tasks.named('test') {
// Use junit platform for unit tests.
useJUnitPlatform()
}