1+ /*
2+ * MIT License
3+ *
4+ * Copyright (c) 2024 Hydrologic Engineering Center
5+ *
6+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7+ * of this software and associated documentation files (the "Software"), to deal
8+ * in the Software without restriction, including without limitation the rights
9+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+ * copies of the Software, and to permit persons to whom the Software is
11+ * furnished to do so, subject to the following conditions:
12+ *
13+ * The above copyright notice and this permission notice shall be included in all
14+ * copies or substantial portions of the Software.
15+ *
16+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+ * SOFTWARE.
23+ */
24+
125plugins {
226 id " com.palantir.git-version" version " 3.1.0"
27+ id(" org.sonarqube" ) version " 5.0.0.4638"
328}
429
530def versionLabel (gitInfo ) {
@@ -43,4 +68,22 @@ subprojects {
4368 html. outputLocation = layout. buildDirectory. dir(' jacoco' )
4469 }
4570 }
71+ sonarqube {
72+ properties {
73+ property " sonar.sources" , " src/main/java"
74+ property " sonar.tests" , " src/test/java"
75+ property ' sonar.coverage.jacoco.xmlReportPaths' , " ${ buildDir} /reports/jacoco/test/jacocoTestReport.xml"
76+ }
77+ }
78+ }
79+
80+ sonar {
81+ properties {
82+ property " sonar.projectKey" , " HydrologicEngineeringCenter_cwms-data-api-client"
83+ property " sonar.organization" , " hydrologicengineeringcenter"
84+ property " sonar.host.url" , " https://sonarcloud.io"
85+ property " sonar.pullrequest.provider" , " GitHub"
86+ property " sonar.pullrequest.github.repository" , " HydrologicEngineeringCenter/cwms-data-api-client"
87+ property " sonar.projectVersion" , versionDetails(). lastTag + " +"
88+ }
4689}
0 commit comments