11plugins {
2- id ' org.springframework.boot' version ' 2.2.1.RELEASE'
3- id ' io.spring.dependency-management' version ' 1.0.8.RELEASE'
42 id ' java'
53 id ' base'
64 id " org.sonarqube" version " 3.5.0.2730"
75}
8- sourceCompatibility = ' 1.8'
9- archivesBaseName = ' app'
10-
11- repositories {
12- mavenCentral()
13- }
14-
15- dependencies {
16- implementation ' org.springframework.boot:spring-boot-starter-web'
17- testImplementation(' org.springframework.boot:spring-boot-starter-test' ) {
18- exclude group : ' org.junit.vintage' , module : ' junit-vintage-engine'
19- }
20- }
21-
22- springBoot {
23- mainClassName = ' com.sample.SampleApplication.java'
24- }
25- test {
26- useJUnitPlatform()
27- }
286
297sonarqube {
308 properties {
@@ -34,7 +12,17 @@ sonarqube {
3412 // property "sonar.host.url", "http://127.0.0.1:9000"
3513 property " sonar.host.url" , " https://sonarcloud.io"
3614 property " sonar.sourceEncoding" , " UTF-8"
15+ property " sonar.sources" , " ."
16+ property " sonar.python.version" , " 3.9"
17+ property " sonar.inclusions" , " **/*.yml"
18+ property " sonar.exclusions" , " build/**, gha-creds-*.json, .*sa, java/**"
3719 // property "sonar.java.binaries", "build"
3820 property " sonar.links.ci" , " https://github.com/DevSecOpsSamples/githubactions/actions"
3921 }
22+ }
23+
24+ clean. doFirst {
25+ delete " ${ rootDir} /.pytest_cache"
26+ delete fileTree(dir : ' ./' , include : ' **/.coverage' )
27+ delete fileTree(dir : ' python' , include : ' **/*.pyc' )
4028}
0 commit comments