diff --git a/tutorials/checker/build.gradle.kts b/tutorials/checker/build.gradle.kts index d34c542639..d18a9dccaf 100644 --- a/tutorials/checker/build.gradle.kts +++ b/tutorials/checker/build.gradle.kts @@ -28,7 +28,7 @@ fun findSnippets(dirs: List): List { currentSnippet.clear() } else { if (snippetStart != 0) { - currentSnippet.appendln(line) + currentSnippet.appendLine(line) } } } @@ -50,6 +50,24 @@ fun cloneTemplate(template: String, index: Int, content: String): File { return tempDir } +val ignoreTill = java.time.LocalDate.parse("2022-02-01") + +fun isIgnored(tutorial: String): Boolean { + if (java.time.LocalDate.now() > ignoreTill) return false + return when (tutorial) { + "IGNORED" -> true + else -> false + } +} + +fun maybeFail(tutorial: String, message: String) { + if (!isIgnored(tutorial)) { + throw GradleException(message) + } else { + println("IGNORED ERROR: $message") + } +} + @OptIn(ExperimentalStdlibApi::class) fun checkDirs(dirs: List, template: String, buildCmd: String = "build") { val snippets = findSnippets(dirs) @@ -83,7 +101,7 @@ fun checkDirs(dirs: List, template: String, buildCmd: String = "build") if (proc.exitValue() != 0) { println(proc.inputStream.bufferedReader().readText()) println(proc.errorStream.bufferedReader().readText()) - throw GradleException("Error in snippet at ${snippet.file}:${snippet.lineNumber}") + maybeFail(snippet.file.parentFile.name, "Error in snippet at ${snippet.file}:${snippet.lineNumber}") } } } diff --git a/tutorials/checker/gradle/wrapper/gradle-wrapper.properties b/tutorials/checker/gradle/wrapper/gradle-wrapper.properties index 549d84424d..2e6e5897b5 100644 --- a/tutorials/checker/gradle/wrapper/gradle-wrapper.properties +++ b/tutorials/checker/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists