Skip to content

Commit 162c929

Browse files
committed
Remove workaround that should now be redundant
See gh-41980
1 parent 4b0b5c2 commit 162c929

File tree

1 file changed

+2
-16
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit

1 file changed

+2
-16
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleProjectBuilder.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,23 +18,17 @@
1818

1919
import java.io.File;
2020

21-
import org.gradle.api.JavaVersion;
2221
import org.gradle.api.Project;
23-
import org.gradle.internal.nativeintegration.services.NativeServices;
24-
import org.gradle.internal.nativeintegration.services.NativeServices.NativeServicesMode;
2522
import org.gradle.testfixtures.ProjectBuilder;
26-
import org.gradle.testfixtures.internal.ProjectBuilderImpl;
2723

2824
import org.springframework.util.Assert;
2925
import org.springframework.util.StringUtils;
3026

3127
/**
3228
* Helper class to build Gradle {@link Project Projects} for test fixtures. Wraps
33-
* functionality of Gradle's own {@link ProjectBuilder} in order to work around an issue
34-
* on JDK 17 and 18.
29+
* functionality of Gradle's own {@link ProjectBuilder}.
3530
*
3631
* @author Christoph Dreis
37-
* @see <a href="https://github.com/gradle/gradle/issues/16857">Gradle Support JDK 17</a>
3832
*/
3933
public final class GradleProjectBuilder {
4034

@@ -68,14 +62,6 @@ public Project build() {
6862
if (StringUtils.hasText(this.name)) {
6963
builder.withName(this.name);
7064
}
71-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
72-
NativeServices.initializeOnClient(userHome, NativeServicesMode.ENABLED);
73-
try {
74-
ProjectBuilderImpl.getGlobalServices();
75-
}
76-
catch (Throwable ignore) {
77-
}
78-
}
7965
return builder.build();
8066
}
8167

0 commit comments

Comments
 (0)