-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
55 lines (51 loc) · 1.76 KB
/
settings.gradle.kts
File metadata and controls
55 lines (51 loc) · 1.76 KB
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
54
55
rootProject.name = "sonarqube-gradle-plugin"
pluginManagement {
// The environment variables ARTIFACTORY_PRIVATE_USERNAME and ARTIFACTORY_PRIVATE_PASSWORD are used on CI env
// If you have access to "repox.jfrog.io" you can add artifactoryUsername and artifactoryPassword to ~/.gradle/gradle.properties
val artifactoryUsername: String =
System.getenv("ARTIFACTORY_PRIVATE_USERNAME") ?: providers.gradleProperty("artifactoryUsername").getOrElse("")
val artifactoryPassword: String =
System.getenv("ARTIFACTORY_PRIVATE_PASSWORD") ?: providers.gradleProperty("artifactoryPassword").getOrElse("")
val repoxRepository: java.net.URI =
uri("https://repox.jfrog.io/repox/" + (if (providers.gradleProperty("qa").isPresent()) "sonarsource-qa" else "sonarsource"))
repositories {
mavenLocal()
if (artifactoryUsername.isNotEmpty() && artifactoryPassword.isNotEmpty()) {
maven {
url = repoxRepository
credentials {
username = artifactoryUsername
password = artifactoryPassword
}
}
} else {
mavenCentral()
}
gradlePluginPortal()
google()
}
}
dependencyResolutionManagement {
repositories.addAll(pluginManagement.repositories)
}
plugins {
id("com.gradle.develocity") version "3.18.2"
}
develocity {
server = "https://develocity-public.sonar.build"
buildScan {
capture {
buildLogging.set(!startParameter.taskNames.contains("properties"))
}
}
}
val isCI: Boolean = System.getenv("CI") != null
buildCache {
local {
isEnabled = !isCI
}
remote(develocity.buildCache) {
isEnabled = true
isPush = isCI
}
}