Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/springwolf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ jobs:
- name: Build with Gradle
run: ./gradlew -p springwolf-core build

- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Run SonarCloud analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew -p springwolf-core build sonarqube --info

- name: Publish package
if: github.ref == 'refs/heads/master'
run: ./gradlew -p springwolf-core publish
Expand Down
17 changes: 17 additions & 0 deletions springwolf-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ plugins {

id 'org.springframework.boot' version '3.0.2'
id 'io.spring.dependency-management' version '1.1.0'

id 'org.sonarqube' version "3.5.0.2730"
id 'jacoco'
}

def isSnapshot = Boolean.valueOf(project.findProperty('SNAPSHOT'))
Expand Down Expand Up @@ -63,6 +66,11 @@ java {
test {
useJUnitPlatform()
}
jacocoTestReport {
reports {
xml.required = true
}
}

publishing {
publications {
Expand Down Expand Up @@ -131,3 +139,12 @@ signing {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}

sonarqube {
properties {
property "sonar.projectKey", "timonback_springwolf-core"
property "sonar.organization", "timonback"
property "sonar.host.url", "https://sonarcloud.io"
}
}