Skip to content

Commit

Permalink
Merge branch '2.7.x' into 3.0.x
Browse files Browse the repository at this point in the history
Closes gh-35037
  • Loading branch information
wilkinsona committed Apr 17, 2023
2 parents 284e4d6 + 88ec47f commit df93b39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,31 @@ void noKotlinVersionPropertyWithoutKotlinPlugin() {

@TestTemplate
void kotlinVersionPropertyIsSet() {
String output = this.gradleBuild.build("kotlinVersion", "dependencies", "--configuration", "compileClasspath")
String output = this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1")
.build("kotlinVersion", "dependencies", "--configuration", "compileClasspath")
.getOutput();
assertThat(output).containsPattern("Kotlin version: [0-9]\\.[0-9]\\.[0-9]+");
}

@TestTemplate
void kotlinCompileTasksUseJavaParametersFlagByDefault() {
assertThat(this.gradleBuild.build("kotlinCompileTasksJavaParameters").getOutput())
.contains("compileKotlin java parameters: true")
assertThat(this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1")
.build("kotlinCompileTasksJavaParameters")
.getOutput()).contains("compileKotlin java parameters: true")
.contains("compileTestKotlin java parameters: true");
}

@TestTemplate
void kotlinCompileTasksCanOverrideDefaultJavaParametersFlag() {
assertThat(this.gradleBuild.build("kotlinCompileTasksJavaParameters").getOutput())
.contains("compileKotlin java parameters: false")
assertThat(this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1")
.build("kotlinCompileTasksJavaParameters")
.getOutput()).contains("compileKotlin java parameters: false")
.contains("compileTestKotlin java parameters: false");
}

@TestTemplate
void taskConfigurationIsAvoided() throws IOException {
BuildResult result = this.gradleBuild.build("help");
BuildResult result = this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1").build("help");
String output = result.getOutput();
BufferedReader reader = new BufferedReader(new StringReader(output));
String line;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private GradleVersions() {
}

public static List<String> allCompatible() {
return Arrays.asList("7.5.1", GradleVersion.current().getVersion(), "8.0.2");
return Arrays.asList("7.5.1", GradleVersion.current().getVersion(), "8.0.2", "8.1");
}

public static String minimumCompatible() {
Expand Down

0 comments on commit df93b39

Please sign in to comment.