|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2022 the original author or authors. |
| 2 | + * Copyright 2012-2024 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
18 | 18 |
|
19 | 19 | import java.io.File;
|
20 | 20 |
|
21 |
| -import org.gradle.api.JavaVersion; |
22 | 21 | import org.gradle.api.Project;
|
23 |
| -import org.gradle.internal.nativeintegration.services.NativeServices; |
24 |
| -import org.gradle.internal.nativeintegration.services.NativeServices.NativeServicesMode; |
25 | 22 | import org.gradle.testfixtures.ProjectBuilder;
|
26 |
| -import org.gradle.testfixtures.internal.ProjectBuilderImpl; |
27 | 23 |
|
28 | 24 | import org.springframework.util.Assert;
|
29 | 25 | import org.springframework.util.StringUtils;
|
30 | 26 |
|
31 | 27 | /**
|
32 | 28 | * 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}. |
35 | 30 | *
|
36 | 31 | * @author Christoph Dreis
|
37 |
| - * @see <a href="https://github.com/gradle/gradle/issues/16857">Gradle Support JDK 17</a> |
38 | 32 | */
|
39 | 33 | public final class GradleProjectBuilder {
|
40 | 34 |
|
@@ -68,14 +62,6 @@ public Project build() {
|
68 | 62 | if (StringUtils.hasText(this.name)) {
|
69 | 63 | builder.withName(this.name);
|
70 | 64 | }
|
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 |
| - } |
79 | 65 | return builder.build();
|
80 | 66 | }
|
81 | 67 |
|
|
0 commit comments