Reputation: 1398
I've just started to use Jenkins for CI with Gradle build tool for my project. According to Jenkins Gradle Integration: Invoke Gradle vs. Use Gradle Wrapper options I should use Gradle wrapper, because I define custom maven URL in init.gradle.
Code below is init.gradle on my computer.
allprojects {
buildscript.repositories {
maven { url "url here" }
}
buildscript.configurations.all {
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
maven { url "url here" }
}
}
How can I configure Jenkins to use this settings?
Upvotes: 4
Views: 2192
Reputation: 1398
I just added
--init-script "path to init.gradle"
into Gradle Switches field and it worked
Upvotes: 4