From 46e428f737b97cfbecc951fd5e3b7ee3e200296a Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Tue, 30 Jun 2020 21:30:20 +0200 Subject: [PATCH] use bash to execute check-generateLogic-committed because powershell seems not to respect the exit code moreover: - move to own workflow as it seems to interfere with other steps - stripIndent() needs to have the same indent as with jdk13+ no longer groovy's stripIndent is called but jdk's one => see https://issues.apache.org/jira/browse/GROOVY-9423 --- .github/workflows/java-windows.yml | 3 ++- logic/generateLogic.gradle | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/java-windows.yml b/.github/workflows/java-windows.yml index ee389f87b..382ace140 100644 --- a/.github/workflows/java-windows.yml +++ b/.github/workflows/java-windows.yml @@ -21,9 +21,10 @@ jobs: - name: check generateLogic committed run: ./gradle/scripts/check-generateLogic-committed.sh + shell: bash - name: buildNonDeprecatedJvm - run: ./gradlew buildNonDeprecatedJvm + run: ./gradlew clean buildNonDeprecatedJvm - name: Cache android jar id: android-cache diff --git a/logic/generateLogic.gradle b/logic/generateLogic.gradle index 1f4097b0c..0c218e5be 100644 --- a/logic/generateLogic.gradle +++ b/logic/generateLogic.gradle @@ -40,11 +40,11 @@ def createGenerateLogicTask(Project project, String implsFileName) { fileName.substring(0, fileName.length() - "Assertions.kt".length()) } def header = """\ - //--------------------------------------------------- - // Generated content, modify: - // logic/generateLogic.gradle - // if necessary - enjoy the day 🙂 - //--------------------------------------------------- + //--------------------------------------------------- + // Generated content, modify: + // logic/generateLogic.gradle + // if necessary - enjoy the day 🙂 + //--------------------------------------------------- """.stripIndent().replace("\n", ln) @@ -59,7 +59,7 @@ def createGenerateLogicTask(Project project, String implsFileName) { import kotlin.jvm.JvmName import ch.tutteli.atrium.creating.AssertionContainer - """.stripIndent().replace("\n", ln) + """.stripIndent().replace("\n", ln) interfaces.forEach { def type = getType(it) @@ -75,7 +75,7 @@ def createGenerateLogicTask(Project project, String implsFileName) { internal inline val AssertionContainer._${type.uncapitalize()}Impl get() = getImpl(${type}Assertions::class) { Default${type}Assertions() } - """.stripIndent().replace("\n", ln) + """.stripIndent().replace("\n", ln) } }