File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ val pluginName = "sonarqube-mcp-server"
2121val mainClassName = " org.sonarsource.sonarqube.mcp.SonarQubeMcpServer"
2222
2323// The environment variables ARTIFACTORY_PRIVATE_USERNAME and ARTIFACTORY_PRIVATE_PASSWORD are used on CI env
24- // On local box, please add artifactoryUsername and artifactoryPassword to ~/.gradle/gradle.properties
24+ // On local box, please add artifactoryUrl, artifactoryUsername and artifactoryPassword to ~/.gradle/gradle.properties
25+ val artifactoryUrl = System .getenv(" ARTIFACTORY_URL" )
26+ ? : (if (project.hasProperty(" artifactoryUrl" )) project.property(" artifactoryUrl" ).toString() else " " )
2527val artifactoryUsername = System .getenv(" ARTIFACTORY_PRIVATE_USERNAME" )
2628 ? : (if (project.hasProperty(" artifactoryUsername" )) project.property(" artifactoryUsername" ).toString() else " " )
2729val artifactoryPassword = System .getenv(" ARTIFACTORY_PRIVATE_PASSWORD" )
@@ -34,19 +36,15 @@ java {
3436}
3537
3638repositories {
37- maven( " https://repox.jfrog.io/repox/sonarsource " ) {
38- if (artifactoryUsername.isNotEmpty() && artifactoryPassword.isNotEmpty() ) {
39+ if (artifactoryUrl.isNotEmpty() && artifactoryUsername.isNotEmpty() && artifactoryPassword.isNotEmpty() ) {
40+ maven( " $artifactoryUrl /sonarsource " ) {
3941 credentials {
4042 username = artifactoryUsername
4143 password = artifactoryPassword
4244 }
4345 }
44- }
45- mavenCentral {
46- content {
47- // avoid dependency confusion
48- excludeGroupByRegex(" com\\ .sonarsource.*" )
49- }
46+ } else {
47+ mavenCentral()
5048 }
5149}
5250
You can’t perform that action at this time.
0 commit comments