@@ -38,12 +38,6 @@ buildScan {
3838 }
3939}
4040
41- task(' aa' ) {
42- print (" aaa" )
43- print (project. hasProperty(' gitter.url' ))
44- print (project. property(' gitter.url' ))
45- }
46-
4741// Configuration to apply to all the projects
4842allprojects {
4943
@@ -120,36 +114,6 @@ configure(javaprojects) {
120114 }
121115 }
122116
123- // Apply sonarqube
124- apply plugin : ' org.sonarqube'
125- sonarqube {
126- properties {
127- def hasIntegTest = new File (projectDir, ' src/integTest/java' ). directory
128-
129- property " sonar.sourceEncoding" , " UTF-8"
130- property " sonar.sources" , " src/main/java"
131- property " sonar.scm.disabled " , " true"
132-
133- if (hasIntegTest) {
134- property " sonar.tests" , " src/test/java,src/integTest/java"
135- } else {
136- property " sonar.tests" , " src/test/java"
137- }
138-
139- property " sonar.java.coveragePlugin" , " jacoco"
140- if (hasIntegTest) {
141- property " sonar.jacoco.reportPaths" , " build/jacoco/test.exec,build/jacoco/integrationTest.exec"
142- property " sonar.junit.reportPaths" , " build/test-results/test,build/test-results/integrationTest"
143- } else {
144- property " sonar.jacoco.reportPaths" , " build/jacoco/test.exec"
145- property " sonar.junit.reportPaths" , " build/test-results/test"
146- }
147-
148- property " sonar.java.pmd.reportPaths" , " build/reports/pmd/main.xml"
149- property " sonar.java.checkstyle.reportPaths" , " build/reports/checkstyle/main.xml"
150- }
151- }
152-
153117}
154118
155119// Configuration to apply to JAVA Projects
@@ -214,6 +178,35 @@ configure(publishedprojects) {
214178 }
215179 }
216180
181+ // Apply sonarqube
182+ apply plugin : ' org.sonarqube'
183+ sonarqube {
184+ properties {
185+ def hasIntegTest = new File (projectDir, ' src/integTest/java' ). directory
186+
187+ property " sonar.sourceEncoding" , " UTF-8"
188+ property " sonar.sources" , " src/main/java"
189+ property " sonar.scm.disabled " , " true"
190+
191+ if (hasIntegTest) {
192+ property " sonar.tests" , " src/test/java,src/integTest/java"
193+ } else {
194+ property " sonar.tests" , " src/test/java"
195+ }
196+
197+ property " sonar.java.coveragePlugin" , " jacoco"
198+ if (hasIntegTest) {
199+ property " sonar.jacoco.reportPaths" , " build/jacoco/test.exec,build/jacoco/integrationTest.exec"
200+ property " sonar.junit.reportPaths" , " build/test-results/test,build/test-results/integrationTest"
201+ } else {
202+ property " sonar.jacoco.reportPaths" , " build/jacoco/test.exec"
203+ property " sonar.junit.reportPaths" , " build/test-results/test"
204+ }
205+
206+ property " sonar.java.pmd.reportPaths" , " build/reports/pmd/main.xml"
207+ property " sonar.java.checkstyle.reportPaths" , " build/reports/checkstyle/main.xml"
208+ }
209+ }
217210}
218211
219212// report tools
0 commit comments