-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
42 lines (36 loc) · 1.1 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
plugins {
id 'org.springframework.boot' version '2.4.1'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'java'
}
group = 'org.github.jeffbswope'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(15)
}
}
// toolchain not automatically applied to BootRun task by default
// this seems by design that it will:
// "Setup all compile, test and javadoc tasks to use the defined toolchain which may be different than the one Gradle itself uses"
// https://docs.gradle.org/current/userguide/toolchains.html
//
// Without reference to JavaExec, which I guess are intended to be set manually.
//
// In any case, with this block commented-out, we get an error on bootRun related to trying to run the
// Java 15-compiled code with Gradle's Java 8.
bootRun {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(15)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}