File tree 6 files changed +17
-24
lines changed
6 files changed +17
-24
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ tasks.test {
107
107
.getOrElse(JavaVersion .current().majorVersion)
108
108
languageVersion.set(JavaLanguageVersion .of(javaVersion))
109
109
providers.gradleProperty(" testJavaVendor" ).map {
110
- when (it.lowercase()) {
110
+ when (it.lowercase(Locale . US )) {
111
111
" oracle" -> vendor.set(JvmVendorSpec .ORACLE )
112
112
" openjdk" -> vendor.set(JvmVendorSpec .ADOPTIUM )
113
113
}
@@ -144,7 +144,7 @@ val testReports = mapOf(
144
144
" testHtmlReportWithOps" to " example-with-build-operations" ,
145
145
" testHtmlReportRegression" to " example-regression"
146
146
)
147
- testReports.forEach { taskName, fileName ->
147
+ testReports.forEach { ( taskName, fileName) ->
148
148
tasks.register<ProcessResources >(taskName) {
149
149
val dataFile = file(" src/test/resources/org/gradle/profiler/report/${fileName} .json" )
150
150
inputs.file(dataFile)
Original file line number Diff line number Diff line change @@ -18,10 +18,15 @@ repositories {
18
18
19
19
java {
20
20
toolchain {
21
- languageVersion.set(JavaLanguageVersion .of(8 ))
21
+ languageVersion.set(JavaLanguageVersion .of(17 ))
22
22
}
23
23
}
24
24
25
+ tasks.withType<AbstractCompile >().configureEach {
26
+ targetCompatibility = " 8"
27
+ sourceCompatibility = " 8"
28
+ }
29
+
25
30
tasks.withType<Test >().configureEach {
26
31
// Add OS as inputs since tests on different OS may behave differently https://github.com/gradle/gradle-private/issues/2831
27
32
// the version currently differs between our dev infrastructure, so we only track the name and the architecture
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ rootProject.children.forEach {
20
20
}
21
21
22
22
/* *
23
- * Intellij- gradle-plugin requires Java 11 .
23
+ * Building gradle-profile requires JDK 17 .
24
24
*/
25
25
fun checkIfCurrentJavaIsCompatible () {
26
- if (! JavaVersion .current().isCompatibleWith(JavaVersion .VERSION_11 )) {
27
- throw GradleException (" This project should be run with Java 11 or later , but it was run with Java ${JavaVersion .current()} ." )
26
+ if (! JavaVersion .current().isCompatibleWith(JavaVersion .VERSION_17 )) {
27
+ throw GradleException (" This project should be build with JDK 17 , but it was run with Java ${JavaVersion .current()} ." )
28
28
}
29
29
}
Original file line number Diff line number Diff line change @@ -5,14 +5,3 @@ plugins {
5
5
dependencies {
6
6
api(gradleApi())
7
7
}
8
-
9
- java {
10
- toolchain {
11
- languageVersion.set(JavaLanguageVersion .of(11 ))
12
- }
13
- }
14
-
15
- tasks.withType<AbstractCompile >().configureEach {
16
- targetCompatibility = " 8"
17
- sourceCompatibility = " 8"
18
- }
Original file line number Diff line number Diff line change @@ -2,12 +2,6 @@ plugins {
2
2
id(" profiler.embedded-library" )
3
3
}
4
4
5
- java {
6
- toolchain {
7
- languageVersion.set(JavaLanguageVersion .of(11 ))
8
- }
9
- }
10
-
11
5
dependencies {
12
6
implementation(" org.ow2.asm:asm:9.2" )
13
7
implementation(project(" :client-protocol" ))
Original file line number Diff line number Diff line change @@ -37,10 +37,15 @@ project.configurations
37
37
38
38
java {
39
39
toolchain {
40
- languageVersion.set(JavaLanguageVersion .of(11 ))
40
+ languageVersion.set(JavaLanguageVersion .of(17 ))
41
41
}
42
42
}
43
43
44
+ tasks.withType<AbstractCompile >().configureEach {
45
+ targetCompatibility = " 11"
46
+ sourceCompatibility = " 11"
47
+ }
48
+
44
49
tasks.test {
45
50
useJUnitPlatform()
46
51
// Disable IntelliJ file system access check for tests: having this check enabled can fail
You can’t perform that action at this time.
0 commit comments