Skip to content

Commit 968b486

Browse files
SQSCANGHA-20 Add detection of Kotlin Gradle configuration
1 parent 320b723 commit 968b486

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.github/workflows/qa.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,26 @@ jobs:
8181
- name: Assert
8282
run: |
8383
./test/assertFileExists ./output.properties
84+
dontFailGradleKotlinTest:
85+
name: >
86+
Don't fail on Kotlin Gradle project
87+
runs-on: ubuntu-latest
88+
steps:
89+
- uses: actions/checkout@v4
90+
with:
91+
token: ${{ secrets.GITHUB_TOKEN }}
92+
- name: Run action on Kotlin Gradle project
93+
id: runTest
94+
uses: ./
95+
continue-on-error: true
96+
env:
97+
SONAR_HOST_URL: http://not_actually_used
98+
with:
99+
projectBaseDir: ./test/gradle-project
100+
args: -Dsonar.scanner.dumpToFile=./output.properties
101+
- name: Assert
102+
run: |
103+
./test/assertFileExists ./output.properties
84104
dontFailMavenTest:
85105
name: >
86106
Don't fail on Maven project

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if [[ -f "${INPUT_PROJECTBASEDIR%/}/pom.xml" ]]; then
2525
to get more accurate results."
2626
fi
2727

28-
if [[ -f "${INPUT_PROJECTBASEDIR%/}/build.gradle" ]]; then
28+
if [[ -f "${INPUT_PROJECTBASEDIR%/}/build.gradle" || -f "${INPUT_PROJECTBASEDIR%/}/build.gradle.kts" ]]; then
2929
echo "WARNING! Gradle project detected. Sonar recommends using the SonarQube plugin for Gradle during the build process instead of using this GitHub Action
3030
to get more accurate results."
3131
fi

test/gradle-project-kotlin/build.gradle.kts

Whitespace-only changes.

0 commit comments

Comments
 (0)