|
|
@ -48,28 +48,31 @@ class KotlinPluginActionIntegrationTests {
|
|
|
|
|
|
|
|
|
|
|
|
@TestTemplate
|
|
|
|
@TestTemplate
|
|
|
|
void kotlinVersionPropertyIsSet() {
|
|
|
|
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();
|
|
|
|
.getOutput();
|
|
|
|
assertThat(output).containsPattern("Kotlin version: [0-9]\\.[0-9]\\.[0-9]+");
|
|
|
|
assertThat(output).containsPattern("Kotlin version: [0-9]\\.[0-9]\\.[0-9]+");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@TestTemplate
|
|
|
|
@TestTemplate
|
|
|
|
void kotlinCompileTasksUseJavaParametersFlagByDefault() {
|
|
|
|
void kotlinCompileTasksUseJavaParametersFlagByDefault() {
|
|
|
|
assertThat(this.gradleBuild.build("kotlinCompileTasksJavaParameters").getOutput())
|
|
|
|
assertThat(this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1")
|
|
|
|
.contains("compileKotlin java parameters: true")
|
|
|
|
.build("kotlinCompileTasksJavaParameters")
|
|
|
|
|
|
|
|
.getOutput()).contains("compileKotlin java parameters: true")
|
|
|
|
.contains("compileTestKotlin java parameters: true");
|
|
|
|
.contains("compileTestKotlin java parameters: true");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@TestTemplate
|
|
|
|
@TestTemplate
|
|
|
|
void kotlinCompileTasksCanOverrideDefaultJavaParametersFlag() {
|
|
|
|
void kotlinCompileTasksCanOverrideDefaultJavaParametersFlag() {
|
|
|
|
assertThat(this.gradleBuild.build("kotlinCompileTasksJavaParameters").getOutput())
|
|
|
|
assertThat(this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.1-rc-1")
|
|
|
|
.contains("compileKotlin java parameters: false")
|
|
|
|
.build("kotlinCompileTasksJavaParameters")
|
|
|
|
|
|
|
|
.getOutput()).contains("compileKotlin java parameters: false")
|
|
|
|
.contains("compileTestKotlin java parameters: false");
|
|
|
|
.contains("compileTestKotlin java parameters: false");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@TestTemplate
|
|
|
|
@TestTemplate
|
|
|
|
void taskConfigurationIsAvoided() throws IOException {
|
|
|
|
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();
|
|
|
|
String output = result.getOutput();
|
|
|
|
BufferedReader reader = new BufferedReader(new StringReader(output));
|
|
|
|
BufferedReader reader = new BufferedReader(new StringReader(output));
|
|
|
|
String line;
|
|
|
|
String line;
|
|
|
|