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?
I just added
--init-script "path to init.gradle"
into Gradle Switches field and it worked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With