Skip to content

Commit f0af162

Browse files
committed
Revert "Add SonarQube analysis"
This reverts commit d7fb7dd.
1 parent d7fb7dd commit f0af162

File tree

4 files changed

+8
-43
lines changed

4 files changed

+8
-43
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches: [ "main" ]
66
pull_request:
77
branches: [ "main" ]
8-
types: [opened, synchronize, reopened]
98

109
jobs:
1110
build:
@@ -15,41 +14,22 @@ jobs:
1514
steps:
1615
- name: Checkout Repository
1716
uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
2017

2118
- name: Set up JDK 21
2219
uses: actions/setup-java@v4
2320
with:
2421
java-version: '21'
2522
distribution: 'temurin'
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
2626

27-
- name: Setup & Cache Gradle packages
28-
uses: actions/cache@v4
29-
with:
30-
path: ~/.gradle/caches
31-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
32-
restore-keys: ${{ runner.os }}-gradle
33-
34-
- name: Cache SonarCloud packages
35-
uses: actions/cache@v4
36-
with:
37-
path: ~/.sonar/cache
38-
key: ${{ runner.os }}-sonar
39-
restore-keys: ${{ runner.os }}-sonar
27+
- name: Run PMD Analysis
28+
run: ./gradlew pmdMain pmdTest
29+
continue-on-error: false # Fail if code quality issues are found
4030

4131
- name: Run Unit Tests
4232
run: ./gradlew test
4333

4434
- name: Build Project
45-
run: ./gradlew build -x test
46-
47-
- name: Run PMD Analysis
48-
run: ./gradlew pmdMain pmdTest
49-
continue-on-error: false # Fail if code quality issues are found
50-
51-
- name: Run Sonar Analysis
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
55-
run: ./gradlew sonar --info
35+
run: ./gradlew build

buildSrc/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,3 @@ plugins {
55
repositories {
66
gradlePluginPortal()
77
}
8-
9-
dependencies {
10-
implementation(libs.sonarqube.gradle.plugin)
11-
}

buildSrc/src/main/groovy/com.craftsmanshipinsoftware.common-conventions.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
22
id 'java'
33
id 'pmd'
4-
id "org.sonarqube"
54
}
65

76
repositories {
@@ -29,11 +28,3 @@ pmd {
2928
"category/java/bestpractices.xml",
3029
"category/java/performance.xml"]
3130
}
32-
33-
sonar {
34-
properties {
35-
property "sonar.projectKey", "durimkryeziu_exercises-for-programmers-java"
36-
property "sonar.organization", "durimkryeziu"
37-
property "sonar.host.url", "https://sonarcloud.io"
38-
}
39-
}

gradle/libs.versions.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
22
[versions]
33
assertj-core = "3.26.3"
4-
javafxplugin = "0.1.0"
54
junit-jupiter = "5.11.0"
5+
javafxplugin = "0.1.0"
66
pmd = "7.6.0"
7-
sonarqube = "5.1.0.4882"
87

98
[libraries]
109
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj-core" }
1110
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
12-
sonarqube-gradle-plugin = { module = "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin", version.ref = "sonarqube" }
1311

1412
[plugins]
1513
javafxplugin = { id = "org.openjfx.javafxplugin", version.ref = "javafxplugin" }

0 commit comments

Comments
 (0)