diff --git a/.github/matchers/gradle-build-kotlin-error-matcher.json b/.github/matchers/gradle-build-kotlin-error-matcher.json new file mode 100644 index 0000000000..bd9e87622d --- /dev/null +++ b/.github/matchers/gradle-build-kotlin-error-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "gradle-build-kotlin-error-matcher", + "severity": "error", + "pattern": [ + { + "regexp": "^e:\\sfile:\/\/([^:]+):(\\d+):(\\d+)\\s(.+)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + } + ] +} diff --git a/.github/matchers/gradle-build-kotlin-error-matcher.json.license b/.github/matchers/gradle-build-kotlin-error-matcher.json.license new file mode 100644 index 0000000000..f24ebfe55b --- /dev/null +++ b/.github/matchers/gradle-build-kotlin-error-matcher.json.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: none +SPDX-License-Identifier: CC0-1.0 diff --git a/.github/matchers/gradle-build-matcher.json b/.github/matchers/gradle-build-matcher.json new file mode 100644 index 0000000000..e22f22eac4 --- /dev/null +++ b/.github/matchers/gradle-build-matcher.json @@ -0,0 +1,16 @@ +{ + "problemMatcher": [ + { + "owner": "gradle-build-matcher", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):\\s(error|Error):\\s(.+)$", + "file": 1, + "line": 2, + "severity": 3, + "message": 4 + } + ] + } + ] +} diff --git a/.github/matchers/gradle-build-matcher.json.license b/.github/matchers/gradle-build-matcher.json.license new file mode 100644 index 0000000000..f24ebfe55b --- /dev/null +++ b/.github/matchers/gradle-build-matcher.json.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: none +SPDX-License-Identifier: CC0-1.0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f60c53f21b..67c506394b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,26 @@ jobs: with: distribution: "temurin" java-version: "17" + - name: "Gradle Wrapper validation" + uses: gradle/wrapper-validation-action@v2 - name: "Setup Gradle" uses: gradle/actions/setup-gradle@v3 + - name: "Setup matchers" + run: | + # Setting up matchers... + + matchers_dir='${{ github.workspace }}/.github/matchers' + matcher_list() + { + echo 'gradle-build-matcher.json' + echo 'gradle-build-kotlin-error-matcher.json' + } + + matcher_list | while IFS='' read -r NAME; do + if test -f "${matchers_dir:?}/${NAME:?}"; then + echo "::add-matcher::${matchers_dir:?}/${NAME:?}" + echo "Matcher configured: ${NAME:?}" + fi + done - name: "Execute Gradle build" run: "./gradlew --no-daemon build"