-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
43 lines (36 loc) · 1.19 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
import org.springframework.boot.gradle.tasks.run.BootRun
plugins {
id("org.springframework.boot") version libs.versions.spring.boot
id("io.spring.dependency-management") version libs.versions.spring.dependency.management
id("org.graalvm.buildtools.native") version libs.versions.graalvm.buildtools
}
repositories {
mavenCentral()
}
tasks.withType<BootRun> {
enabled = false
}
tasks.register<Copy>("select-compose-file") {
group = "build"
description = "Copy compose file for OS architecture"
val composeFile = if (System.getProperty("os.arch").equals("aarch64")) {
"compose_arm.yaml"
} else {
"compose_amd.yaml"
}
println("Using $composeFile")
from("${rootDir}/docker/arch/$composeFile")
into("${rootDir}/docker")
rename(composeFile, "compose.yaml")
}
tasks.register("sonar") {
group = "verification"
description = "Run sonarqube analysis"
dependsOn(":flashcards-server:sonar")
dependsOn(":flashcards-client:sonar")
}
tasks.register<BootRun>("bootRunFlashcards") {
group = "build"
description = "Run flashcards app and start containers for mongodb and auth server"
dependsOn(":flashcards-server:bootRun")
}