Warn when running the compiler under Java 6 or 7

(cherry picked from commit 5537800)

(cherry picked from commit 5614874)
This commit is contained in:
Dmitry Jemerov
2017-02-15 17:04:24 +01:00
parent 000da2f6d0
commit af7de9a0c5
11 changed files with 29 additions and 5 deletions
@@ -74,12 +74,13 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
@NotNull BinaryVersion version
) {
String testDataAbsoluteDir = new File(testDataDir).getAbsolutePath();
String normalizedOutputWithoutExitCode = pureOutput
String normalizedOutputWithoutExitCode = StringUtil.convertLineSeparators(pureOutput)
.replace(testDataAbsoluteDir, "$TESTDATA_DIR$")
.replace(FileUtil.toSystemIndependentName(testDataAbsoluteDir), "$TESTDATA_DIR$")
.replace(PathUtil.getKotlinPathsForDistDirectory().getHomePath().getAbsolutePath(), "$PROJECT_DIR$")
.replace("expected version is " + version, "expected version is $ABI_VERSION$")
.replace("\\", "/")
.replaceAll("^.+running the Kotlin compiler under Java 6 or 7 is unsupported and will no longer be possible in a future update\\.\n", "")
.replace(KotlinCompilerVersion.VERSION, "$VERSION$");
return normalizedOutputWithoutExitCode + exitCode;