1
+ import org.springframework.boot.gradle.tasks.run.BootRun
2
+
1
3
plugins {
2
4
id ' java'
3
5
id ' java-test-fixtures'
@@ -23,7 +25,14 @@ java {
23
25
}
24
26
}
25
27
26
- tasks. register(" keycloakBootRun" , org.springframework.boot.gradle.tasks.run.BootRun . class) {
28
+ // Configure all bootRun tasks to use the toolchain from above
29
+ tasks. withType(BootRun . class). configureEach {
30
+ var toolchain = project. extensions. getByType(JavaPluginExtension . class). toolchain;
31
+ var toolchainService = project. extensions. getByType(JavaToolchainService . class);
32
+ it. javaLauncher. convention(toolchainService. launcherFor(toolchain))
33
+ }
34
+
35
+ tasks. register(" keycloakBootRun" , BootRun . class) {
27
36
description = " Runs the Spring Boot application with the Keycloak profile"
28
37
group = ApplicationPlugin . APPLICATION_GROUP
29
38
classpath = tasks. bootRun. classpath
@@ -32,7 +41,7 @@ tasks.register("keycloakBootRun", org.springframework.boot.gradle.tasks.run.Boo
32
41
systemProperty(" spring.profiles.active" , " bootRun,keycloak" )
33
42
}
34
43
35
- tasks. register(" consoleBootRun" , org.springframework.boot.gradle.tasks.run. BootRun. class) {
44
+ tasks. register(" consoleBootRun" , BootRun . class) {
36
45
description = " Runs the Spring Boot application with routing config for ContentGrid Console development"
37
46
group = ApplicationPlugin . APPLICATION_GROUP
38
47
classpath = tasks. bootRun. classpath
@@ -41,7 +50,7 @@ tasks.register("consoleBootRun", org.springframework.boot.gradle.tasks.run.Boot
41
50
systemProperty(" spring.profiles.active" , " bootRun,console" )
42
51
}
43
52
44
- tasks. register(" runtimeBootRun" , org.springframework.boot.gradle.tasks.run. BootRun. class) {
53
+ tasks. register(" runtimeBootRun" , BootRun . class) {
45
54
description = " Runs ContentGrid Gateway with config for ContentGrid Runtime Platform"
46
55
group = ApplicationPlugin . APPLICATION_GROUP
47
56
classpath = tasks. bootRun. classpath
0 commit comments