Skip to content

Commit

Permalink
Add gradle plugin (as demanded by the GitHub action)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Feb 22, 2020
1 parent 7f06c1b commit b360cdf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,26 @@ jobs:
uses: actions/checkout@v2
with:
depth: 1
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 13.0.2
- uses: actions/cache@v1
name: Restore gradle cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.OS }}-gradle-${{ env.cache-name }}-
${{ runner.OS }}-gradle-
${{ runner.OS }}-
- uses: actions/cache@v1
name: Restore gradle wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Run SonarCloud Scan
run: ./gradlew build sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ plugins {
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.jlink' version '2.17.2'

// required for SonarCube usage
id "org.sonarqube" version "2.8"

// nicer test outputs during running and completion
id 'com.adarshr.test-logger' version '2.0.0'
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
systemProp.sonar.host.url=https://sonarcloud.io

0 comments on commit b360cdf

Please sign in to comment.