Skip to content

Commit

Permalink
Apply temporary deterministic order
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Nov 27, 2020
1 parent b8289de commit 9514753
Showing 1 changed file with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
@ConditionalOnBuildSystem(GradleBuildSystem.ID)
public class GradleProjectGenerationConfiguration {

private static final int TEST_ORDER = 100;

private final IndentingWriterFactory indentingWriterFactory;

public GradleProjectGenerationConfiguration(IndentingWriterFactory indentingWriterFactory) {
Expand Down Expand Up @@ -186,7 +188,17 @@ SettingsGradleProjectContributor settingsGradleProjectContributor(GradleBuild bu
@Bean
@ConditionalOnPlatformVersion("2.2.0.M3")
BuildCustomizer<GradleBuild> testTaskContributor() {
return (build) -> build.tasks().customize("test", (test) -> test.invoke("useJUnitPlatform"));
return new BuildCustomizer<GradleBuild>() {
@Override
public void customize(GradleBuild build) {
build.tasks().customize("test", (test) -> test.invoke("useJUnitPlatform"));
}

@Override
public int getOrder() {
return TEST_ORDER;
}
};
}

@Bean
Expand Down Expand Up @@ -219,7 +231,17 @@ SettingsGradleProjectContributor settingsGradleKtsProjectContributor(GradleBuild
@Bean
@ConditionalOnPlatformVersion("2.2.0.M3")
BuildCustomizer<GradleBuild> testTaskContributor() {
return (build) -> build.tasks().customizeWithType("Test", (test) -> test.invoke("useJUnitPlatform"));
return new BuildCustomizer<GradleBuild>() {
@Override
public void customize(GradleBuild build) {
build.tasks().customizeWithType("Test", (test) -> test.invoke("useJUnitPlatform"));
}

@Override
public int getOrder() {
return TEST_ORDER;
}
};
}

@Bean
Expand Down

0 comments on commit 9514753

Please sign in to comment.