Skip to content

Commit

Permalink
Merge pull request #99 from abdulrahim458/FISH-9578-add-spotbugs-gradle
Browse files Browse the repository at this point in the history
FISH-9578 Gradle spotbugs
  • Loading branch information
jGauravGupta authored Oct 25, 2024
2 parents 7052cab + 7c69881 commit 1f691ca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
14 changes: 1 addition & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,14 @@ pipeline {
}
stages {

stage('Checkout master') {
steps {
script {
checkout changelog: false, poll: true, scm: [$class: 'GitSCM',
branches: [[name: "master"]],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'payara-devops-github-personal-access-token-as-username-password', url:"https://github.com/payara/ecosystem-gradle.git"]]]
}
}
}
stage('Build') {
steps {
script {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Building SRC *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh '''
ls -lrt
cd payara-micro-gradle-plugin
gradle clean build -x check
gradle clean build -x check
'''
echo '*#*#*#*#*#*#*#*#*#*#*#*# Built SRC *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand Down
16 changes: 16 additions & 0 deletions payara-micro-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'maven-publish'
id 'java'
id 'java-gradle-plugin'
id 'com.github.spotbugs' version '5.0.14' // Add SpotBugs plugin
}

group = 'fish.payara.gradle.plugins'
Expand All @@ -28,6 +29,21 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
}

// SpotBugs Configuration
spotbugs {
toolVersion = '4.2.3' // Use the latest stable version
effort = 'max' // Use maximum effort for more detailed analysis
reportLevel = 'low' // Report all issues (low, medium, high)
ignoreFailures = true // Set to true if you want the build to continue even if there are violations
}

tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
reports {
xml.enabled = true // Enable XML report generation
html.enabled = false // Enable HTML report generation
}
}

test {
useJUnitPlatform()
testLogging {
Expand Down

0 comments on commit 1f691ca

Please sign in to comment.