-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
100 lines (82 loc) · 3.08 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
plugins {
id 'org.springframework.boot' version "$springBootVersion"
id 'io.spring.dependency-management' version "$springDependencyVersion"
id 'org.springframework.experimental.aot' version '0.9.1'
id 'com.github.davidmc24.gradle.plugin.avro-base' version '1.0.0'
id 'java'
id 'idea'
}
group = 'com.sample'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = compatibilityVersion
targetCompatibility = compatibilityVersion
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion"
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url confluentUrl }
maven { url springSnapshots }
maven { url springReleases }
}
//Intellij wasn't seeing generated java
def generatedSourcesDir = file('src/generated/main/java')
idea {
module {
sourceDirs += generatedSourcesDir
generatedSourceDirs += generatedSourcesDir
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
compileOnly 'org.projectlombok:lombok'
implementation('org.springframework.boot:spring-boot-starter-web') {
exclude group: 'org.apache.tomcat.embed', module: 'tomcat-embed-core'
exclude group: 'org.apache.tomcat.embed', module: 'tomcat-embed-websocket'
}
implementation 'org.apache.tomcat.experimental:tomcat-embed-programmatic:9.0.44'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation ('org.springframework.cloud:spring-cloud-kubernetes-fabric8-config') {
exclude group: 'org.springframework.cloud', module: 'spring-cloud-loadbalancer'
}
implementation 'org.apache.kafka:kafka-streams'
implementation 'org.springframework.kafka:spring-kafka'
implementation group: 'org.apache.avro', name: 'avro', version: '1.10.2'
implementation group: 'io.confluent', name: 'kafka-avro-serializer', version: '5.5.1'
implementation group: 'io.confluent', name: 'kafka-streams-avro-serde', version: '5.5.1'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.kafka:spring-kafka-test'
}
test {
useJUnitPlatform()
}
def generateAvro = tasks.register("generateAvro", com.github.davidmc24.gradle.plugin.avro.GenerateAvroJavaTask) {
source("src/main/avro")
outputDir = file("src/generated/main/java")
fieldVisibility = "PRIVATE"
enableDecimalLogicalType = true
}
tasks.named("compileJava").configure {
source(generateAvro)
}
clean {
delete "${rootDir}/src/generated/main/java"
}
bootBuildImage {
builder = "paketobuildpacks/builder:tiny"
environment = [
"BP_NATIVE_IMAGE" : "true",
"BP_NATIVE_IMAGE_BUILD_ARGUMENTS" : "-H:+AddAllCharsets --enable-url-protocols=http,https"
]
}