-
Notifications
You must be signed in to change notification settings - Fork 93
/
build.gradle.kts
63 lines (51 loc) · 1.68 KB
/
build.gradle.kts
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
plugins {
alias(libs.plugins.kotlin)
}
repositories {
mavenCentral()
mavenLocal()
}
val quarkusPluginId: String by project
val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project
val projectGroup: String by project
val projectVersion: String by project
group = projectGroup
version = projectVersion
subprojects {
repositories {
mavenCentral()
mavenLocal()
}
apply(plugin = "org.jetbrains.kotlin.jvm")
dependencies {
implementation(platform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation(platform("${quarkusPlatformGroupId}:quarkus-camel-bom:${quarkusPlatformVersion}"))
}
group = project.group
version = projectVersion
plugins.withId(quarkusPluginId) {
val kubernetesDir = layout.buildDirectory.dir("kubernetes")
kubernetesDir.get().asFile.let { dir ->
if (dir.exists()) {
val targetDir = project.projectDir.resolve("kubernetes")
val copyKubernetesDir by tasks.registering(Copy::class) {
from(dir)
into(targetDir)
doFirst {
if (!targetDir.exists()) {
targetDir.mkdirs()
}
}
doLast {
println("Kubernetes directory has been copied to: $targetDir")
}
}
tasks.named("quarkusBuild") {
finalizedBy(copyKubernetesDir)
}
}
}
}
}