File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,28 @@ if (version.endsWith('-SNAPSHOT') && ext.buildNumber != null) {
45
45
version = version. replace(' -SNAPSHOT' , versionSuffix)
46
46
}
47
47
48
+ ext {
49
+ release = project. hasProperty(' release' ) && project. getProperty(' release' )
50
+ official = project. hasProperty(' official' ) && project. getProperty(' official' )
51
+ }
52
+
48
53
repositories {
49
- jcenter()
50
- mavenLocal()
51
- mavenCentral()
52
54
maven {
53
55
url " https://maven.google.com"
54
56
}
57
+ def repository = project. hasProperty(' qa' ) ? ' sonarsource-qa' : ' sonarsource'
55
58
maven {
56
- url " https://repox.sonarsource.com/sonarsource"
59
+ url " https://repox.jfrog.io/repox/${ repository} "
60
+ // The environment variables ARTIFACTORY_PRIVATE_USERNAME and ARTIFACTORY_PRIVATE_PASSWORD are used on QA env (Jenkins)
61
+ // On local box, please add artifactoryUsername and artifactoryPassword to ~/.gradle/gradle.properties
62
+ def artifactoryUsername = System . env. ' ARTIFACTORY_PRIVATE_USERNAME' ?: (project. hasProperty(' artifactoryUsername' ) ? project. getProperty(' artifactoryUsername' ) : ' ' )
63
+ def artifactoryPassword = System . env. ' ARTIFACTORY_PRIVATE_PASSWORD' ?: (project. hasProperty(' artifactoryPassword' ) ? project. getProperty(' artifactoryPassword' ) : ' ' )
64
+ if (artifactoryUsername && artifactoryPassword) {
65
+ credentials {
66
+ username artifactoryUsername
67
+ password artifactoryPassword
68
+ }
69
+ }
57
70
}
58
71
}
59
72
You can’t perform that action at this time.
0 commit comments