Skip to content

Commit 2f092ea

Browse files
committed
ci stuff
1 parent ef809d9 commit 2f092ea

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

gradle/vertx.gradle

+13-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import org.vertx.java.platform.impl.ModuleClassLoader
1818
* limitations under the License.
1919
*/
2020

21-
apply from: "gradle/maven.gradle"
22-
2321
apply plugin: 'java'
2422
apply plugin: 'groovy'
2523
apply plugin: 'idea'
@@ -28,6 +26,13 @@ apply plugin: 'eclipse'
2826
// We load some extra properties from vertx.properties
2927
loadProperties("vertx.properties")
3028

29+
// We have to explicitly load props from the user home dir - on CI we set
30+
// GRADLE_USER_HOME to a different dir to avoid problems with concurrent builds corrupting
31+
// a shared Maven local and using Gradle wrapper concurrently
32+
loadProperties("${System.getProperty('user.home')}/.gradle/gradle.properties")
33+
34+
apply from: "gradle/maven.gradle"
35+
3136
version = project.ext.version
3237
group = modowner
3338
archivesBaseName = modname
@@ -50,7 +55,12 @@ configurations {
5055
}
5156

5257
repositories {
53-
mavenLocal()
58+
if (System.getenv("JENKINS_HOME") == null) {
59+
// We don't want to use mavenLocal when running on CI - mavenLocal is only useful in Gradle for
60+
// publishing artifacts locally for development purposes - maven local is also not threadsafe when there
61+
// are concurrent builds
62+
mavenLocal()
63+
}
5464
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
5565
mavenCentral()
5666
}

0 commit comments

Comments
 (0)