-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
53 lines (46 loc) · 1.63 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import org.sonar.iac.registerAllRuleApiTasks
plugins {
alias(libs.plugins.spotless)
id("org.sonarsource.iac.artifactory-configuration")
id("org.sonarsource.iac.rule-api")
id("org.sonarsource.iac.sonarqube")
id("com.diffplug.blowdryer")
}
spotless {
encoding(Charsets.UTF_8)
kotlinGradle {
ktlint().setEditorConfigPath("$rootDir/.editorconfig")
target("*.gradle.kts", "/build-logic/src/**/*.gradle.kts")
}
}
project(":iac-extensions:kubernetes") {
sonar {
properties {
properties["sonar.sources"] as MutableCollection<String> +=
[email protected]("src/common/java").asFile.toString()
}
}
}
project(":sonar-helm-for-iac") {
sonar {
properties {
property("sonar.sources", ".")
property("sonar.inclusions", "**/*.go")
property("sonar.exclusions", "**/build/**,**/org.sonar.iac.helm/**")
property("sonar.tests", ".")
property("sonar.test.inclusions", "**/*_test.go")
property("sonar.go.tests.reportPaths", "build/test-report.json")
property("sonar.go.coverage.reportPaths", "build/test-coverage.out")
}
}
}
tasks.artifactoryPublish { skip = true }
// This configuration needs to be here and override in another modules, otherwise it doesn't work
artifactoryConfiguration {
artifactsToPublish = "org.sonarsource.iac:sonar-iac-plugin:jar"
artifactsToDownload = ""
repoKeyEnv = "ARTIFACTORY_DEPLOY_REPO"
usernameEnv = "ARTIFACTORY_DEPLOY_USERNAME"
passwordEnv = "ARTIFACTORY_DEPLOY_PASSWORD"
}
registerAllRuleApiTasks()