-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
78 lines (58 loc) · 2.01 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
plugins {
id "com.github.node-gradle.node" version "3.0.1"
id "java"
}
sourceCompatibility = 1.11
group 'org.example'
version '0.0.1-SNAPSHOT'
repositories {
mavenCentral()
maven { url "https://packages.confluent.io/maven/" }
}
dependencies {
implementation 'org.apache.kafka:kafka-clients:2.8.0'
implementation 'org.springframework.boot:spring-boot-starter-web:2.5.5'
implementation group: 'org.json', name: 'json', version: '20210307'
implementation 'org.springframework.kafka:spring-kafka:2.7.6'
implementation group: 'io.confluent', name: 'kafka-json-serializer', version: '6.2.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.5.5'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
node {
// Whether to download and install a specific Node.js version or not
download = true
// Version of node to use.
version = '12.18.3'
// Version of npm to use.
npmVersion = ''
// Set the work directory for unpacking node
workDir = file("${project.buildDir}/nodejs")
// Set the work directory for NPM
npmWorkDir = file("${project.buildDir}/npm")
// Set the work directory where node_modules should be located
nodeProjectDir = file("${project.projectDir}/src/main/ui")
}
test {
useJUnitPlatform()
}
jar.dependsOn('copyDependantLibs')
jar {
manifest {
attributes 'Main-Class': 'de.novatec.tc.KafkaApplication'
}
}
tasks.create(name: "copyDependantLibs", type: Copy) {
from (configurations.runtimeClasspath)
into "$buildDir/dependent-libs"
duplicatesStrategy 'exclude'
}
build.dependsOn('ngBuild')
task ngBuild(type: NodeTask, dependsOn: 'npmInstall') {
script = project.file('src/main/ui/node_modules/@angular/cli/bin/ng')
args = ['build', '--output-path', '../resources/static']
}
clean {
delete "${project.projectDir}/src/main/ui/node_modules"
delete "${project.projectDir}/src/main/resources/static"
}