james_bassett
04/05/2018, 9:53 PMval corporatePluginsIds = listOf("my-plugin-one", "my-plugin-two", "my-plugin-three")
pluginManagement {
// means build scripts don't need to specify the version
// (they just have to apply a version of this script from Nexus)
resolutionStrategy {
eachPlugin {
if (requested.id.name in corporatePluginsIds) {
useVersion("1.2.3")
}
}
}
repositories {
mavenLocal()
maven {
name = "CorporateNexus"
url = uri("<https://nexus.example.com.au/repository/maven-public>")
}
maven {
name = "Gradle Plugin Portal"
url = uri("<https://nexus.ops.console.com.au/repository/gradle-plugin-portal>")
}
}
}
I can just then apply { from("<https://path.to.script.gradle.kts>")}
in my settings.gradle.kts
It works (yay!), but if I don't have a connection to our Nexus repo it fails - I was hoping caching would save me, but as far as I can tell it still does a HEAD on the URL to see if it's changed. Does this mean I need to be connected to our VPN every time I run gradle, or is there some way around this?